#Detect players leaving a region 3
13 messages · Page 1 of 1 (latest)
I’m trying to a system that will detect when a player has enter or left a area. Here is my code. local run = game:GetService("RunService") local pos1 = script.Parent.Position - (script.Parent.Size/ 2) local pos2 = script.Parent.Position + (script.Parent.Size/ 2) local region = Region3.new(pos1, pos2) local playersInRegion = {} run.Stepped:Co...
Does this also apply to get PartsBoundinBox?
Yes, it can just be altered to use that method
thanks
Im making this vision system and its a headache to get the server to render whats infront of the player properly
If you want it to be more efficient then you should look into area logic. Where instead of checking the entire area, you check just the entree/exit points
My script currently checks if the player is inside of the box every task.wait() if not the player is invisible for the player who was looking at him
wish causes noticable FPs drops when you look at someone
(atleast for my potato pc
Maybe just try to optimise it. So just make the program do as little logic as possible to determine what to render and what not
No the method is horrible