How do you stop no-clipping?

So I’m going to start an anti-cheat soon, and I already know how to stop walkspeed/jumppower/flying exploits by just doing some velocity checks. Really one of the last major things I need to do is stop no-clipping, but this one is pretty complicated.

How do you efficiently do this without having much (or any) false positives?

1 Like

Check if the player is inside of collide-able part.

1 Like

The only method I have heard of is raycasting. Now to avoid false positives with ping issues have it require multiple failed raycasts in a small period of time. I’ve never used this method before so I don’t know how much of a performance impact it puts on the server, except you can use raycasts to do most common movement exploits on the server.

1 Like

@Daw588
@xZylter

These are some good ideas but exactly how do you implement/do these? Some code or a more thorough explanation would be very helpful

1 Like

I can think of other method which is checking if the certain part that player touched, is can collide false, and then ask server if its can collide false, if its not then it means that client had modified a part which can be sign of exploiting (no-clipping) however it can be removed if the exploiter finds the anti-cheat, becuase its client sided.

Sure thing, I’ve never needed to deploy this method, but it should work. I’ll put together a list of how the steps go through to try and show a little insight. This is all done inside of a server Heartbeat as it has to be doing these checks as often as possible to decrease the chances of a false positive.

  1. Server saves the player’s current CFrame if they havn’t failed any check for an exploit
  2. Server makes a raycast from previous CFrame to the player’s current CFrame ensuring that their is no parts between the two points
  3. If the raycast finds parts between the 2 positions it positions the player’s character back ot the previously saved CFrame

I have heard Raycasting is really the only reliable method since NetworkOwnership allows exploiters to lie about what their character’s walkspeed, jumppower, touched parts, etc are and only leave position as a usable property.

3 Likes

To expand on this;

Keep in mind this can create false positives when you consider lag, ping, FPS, Roblox’s wonky physics, corners, etc.

And unless you’re extremely careful, implementing this technique in an Obby can be dangerous, because of the numerous glitches/wall-clips that people can use, without exploiting.

When using this method, it’s best to give the player the benefit of the doubt. I recommend only severely punishing the player when they trip the system multiple times in rapid succession.

1 Like

I’m aware the issue this method brings. It’s not a one size fit all solution. Your game should have an anti-exploit that works for your game. But it really is the only method I know of that exploiters can’t easily combat against. And as both of has mentioned in our replies you should only be punishing the player when they fail this check multiple times.

You really can’t make an anti-exploit with 0% false positives. And often just respawning the player or setting their position back is enough to discourage exploits.

3 Likes