How do you stop exploiters in your own roblox game?
My small obby keeps getting people flying and teleporting straight to the end. I'm still new to scripting. What should I be checking on the server side so the client can't just skip its way through every stage?
rate limit your remotes on the server. a lot of exploits are just firing a buy or damage remote hundreds of times a second in a loop. if the server ignores anything faster than a real player could manage, most of that dies.
same idea for distance. if the server sees someone collect an item 200 studs away from them, reject it.
and don't bother with client-side anti-cheat scripts as your main defence. exploiters can delete or disable a LocalScript before it ever runs, so anything that only lives on the client is a speed bump at best. everything that matters gets checked on the server, every time.
The rule that fixes most of it: never trust anything the client tells the server.
Exploiters can run any local script they like, so anything living in a LocalScript is basically theirs. What that means in practice:
- keep money, xp, inventory etc. on the server only (ServerScriptService / server-side values), never let the client set them
- every RemoteEvent handler should check the request makes sense. is the player close enough to the thing they're hitting, do they actually own the item, has the cooldown passed
- rate limit your remotes, if one fires 50 times a second from the same player, ignore it
- for speed and fly hacks, check position changes on the server and pull them back if they moved further than they possibly could
you won't stop people injecting scripts, roblox handles that side. you just make sure their scripts can't actually change anything that matters.