Anti noclip approach

Let’s say I wanted to defend a certain area, an area exploiters in my game seem to like. If I do a while wait(5) loop on the server and getPartsInRegion3 that area every 5 seconds and respawn anyone who isn’t suppose to be in that area, would this work or are there bypasses to getPartsInRegion3?

Anti exploit scripts sure are not the easiest to make.

Why a 5 second wait? I mean, it’s not particularly intensive unless there are a lot of parts in the region. I’d use a whitelist and only try to detect if any player is in the region rather than getting a list of all parts inside it. If it’s on the server, it’ll work. Decrease the delay though, I’d say.


Alright. Do you think getPartsInRegion3 is a good approach as in detection?

It’s one potential way. I think it’ll just end up grabbing all of the parts in the region though, rather than just player parts. To counter this, you could create a custom region every X seconds and check if the HumanoidRootPart of each player is inside it. That would probably work just as well if not better, and it’d be more performant.

With getpartsinregion3 (even with whitelist) you’ll have to be careful because there’s a max to how many parts it will return. I used it for zone control detection and it wouldn’t register more than 1-2 people because R15+all their accessories were a lot of parts.

@Lightlimn ‘s suggestion of using HMR is the correct way to do it so that you don’t run into the parts limit


Well, you can actually just increase the part limit - but yeah what you said does make sense.


omg i can’t believe i missed that on the wiki. lifesaver


I would say it’d be even more performant if he made the region3 once and then checked it in the loop :wink:

1 Like

no pls

Use my knowledge, I beg of you!

1 Like

You’d have to run some tests, but I think the difference would be minimal.