I was wondering what method would be the most efficient in detecting players in an area?
Methods I have heard of
Touched Event
Magnitude/Checking players distance from part
Region3
Touched Event seems like the most efficient as it is an event as far as I know using Region3 and Magnitude require a while loop constantly checking however Touched event requires a part which could interfere with my bullet scripts.
I would like to know if there is any more efficient ways people use to detect players in an area especially for AI player detection and Capture points.
I'm not asking for people to make me a script just to point me in the right direction and clear up misunderstandings.

6 comments
try using the :GetTouchingParts function
In my opinion, I would say magnitude is the best for detecting players in an area mostly because it never fails to detect, and instead of using a while loop, you can use runservice.heartbeat which wouldn't lag a game if I'm correct.
Wow thanks it seemed really promising when I tested it. What are the draw backs of heartbeat anyway?
Yeah I think I will go with Magnitude as I tried a Region3 but it would grab all the surronding parts all the time causing immense lag on the server
@SWARMHOST77 In heartbeat, wait() can't really be used since heartbeat runs every frame of a game.
Ah makes sense