I’m currently making an admin ModuleScript, and I’m stumped on how I would stop cheating on the fly command.
It uses the player’s camera’s CFrame, and from what I know you can’t do that from the server.
How would I stop cheaters from easily doing this themself?
Well, exploiters can easily get access to a flying script without even knowing your admin module exists. So I wouldn’t worry about if they can hack it!
In Adonis, they fly by using a bodyvelocity which is on the client that is in the torso/humanoidrootpart. If you detect a bodyvelocity in the humanoidrootpart or torso, then remove it.
First time posting on the forums .
perhaps you can check how fast a person is moving, such as what @GreenNinja3645 mentioned.
Check how often the Y value changes in conjunction with the movement speed. Are players meant to be on various Y positions? Does your game have speed boosts, etc. Most fly scripts tilt the player. If I make a script then I’ll reply to this message. Cheers!
I think you can also put the script in ServerScriptStorage, and have it check the users permissions ( If conditions permit ), and use a local function, that will look something like this:
local Players = game:GetService("Players")
local function checkPermissions (player) -- Does Lua use cammelCase?
if player whitelisted then:
whitelist
end
end
Players.PlayerAdded:Connect(checkPermissions)
This code is just a rough “mockup” of what it could look like.