Hi, I have my very own game, that is an obby. Because of that, I’m here to ask you how to make anti fly, anti CFrame teleport (but my game teleports player to the spawn when you fall down while parcouring). Also, how to make anti remote spy / dex or another anti exploits?
So, will anyone please help me?
The easiest logic for the anti-teleport (but won’t fix anti-speed) is to check one frame for the player’s position and check the next frame. If they moved too far, they have teleported (however, they may have also lagged so consider this).
To prevent anti-fly, you can continuously check if the player is on the ground. If it seems suspicious that they’re in the air too long, they’re flying. There’s probably a few other ways to check fly exploiting and there’s some resources on the DevForum you can look for by searching.
It’s crucial that this anti-exploit logic be applied on the server as well.
You can’t do anything about remote spy. One thought experiment that will make this easier to see is to imagine any player can code a local script as long as you can have local scripts in your game and do whatever they want. If they couldn’t do that, then they couldn’t remote spy, but then you couldn’t have local scripts either. (actual explanation: the exploiter can call anything and read off the remotes, because the client has all the permission in the world on their end, the server doesn’t control them)
Just sanity check the remotes.
Thanks, but Idk how to probably do this, the datastore doesn’t allow you to save CFrame values.
You would break up the CFrame into different sections, {x, y, z, qX,qY,qZ,qW} then just plug them back into a CFrame when you need.
For anti-fly:
The easiest way is to raycast down from the player’s character at a regular interval. If the rays do not consecutively hit (more times than it could just be a jump), teleport them to the ray’s hit position.
Do this on the server.