This script is supposed to check if a player is inside a region3 zone, if they are inside a region3 they will call an event to a local script which will change the lighting for that specific player and if the player is not found after being found it will send call another event that will just be the same as the last local script just the lighting will be different (just different numbers) this script is running in a hearthbeat is there any way to minimize the lag that hearthbeat can cause or a better way to run the script
#how can I improve my script (less lag)
1 messages · Page 1 of 1 (latest)
how can I improve my script (less lag)
.Touched
yeah
just make a part call it region3
and do
part.Touched:Connect(function(hit)
if hit.Parent:FindFIrstChild("Humanoid") then
local plr = hit.Parent
-- code here with plr ref
end
)
true that should be simple