For walking speed, you could calculate how many studs the player moved since the last frame and check how much time there has been between the last frame and the current and check if the player moved too much on the X and Y positions of the HumanoidRootPart. Although, for the Y positions, it would be much more complicated because the player can jump and fall. Also, you would have to account for any sort of moving platform (ie. car, train, etc) that moves in your game. If you have basic knowledge of physics, it should be easy. You should get familiar with roblox’s physics system if you want to make an anti-exploit script. That script you made will only prevent the player from changing the walk speed but there are alternatives like changing the position of the humanoid root part directly. If i’m not mistaken, anything that happens to the player’s character on the client side is replicated to the server. I don’t know if that’s entirely true but I’m pretty sure it is since animations are replicated automatically. If I am wrong, please correct me.
6 comments
I believe you cannot run a Kick() from a localplayer, or maybe it's just the wait(60) in the line.
I think Heartbeat event will work better(https://developer.roblox.com/en-us/api-reference/event/RunService/Heartbeat). It will fire everytime a new frame create. And we can use :Kick() from LocalScript.
No you can't
Wait, what? The document said that you CAN kick a player by LocalScript https://developer.roblox.com/en-us/api-reference/function/Player/Kick
You can kick a player in a localscript, you just can only kick yoursell.
You can check for abnormalities in the character or player's behavior, and using a whitelist you can bypass the abnormalities. If it's not supposed to happen, add their name to a ban list using data store, and kick them.