Is it possible to detect & prevent players from infinite jumping? It seems pretty easy to do from the client-side, but it’s pretty useless since exploiters can easily just delete the script, so is there a way I can accurately detect infinite jumping from the server-side?
Check if the player is gaining/maintaining upwards velocity with the Jump attribute on the Humanoid ticked on.
You can also use the FloorMaterial attribute to further pinpoint this. If it reads Air, then your character is midair.
![]()
In short: check for the player velocity on the Y axis increasing, constant or not going into the negatives alongside the FloorMaterial and Jump attributes reading Air and true respectively. Do these checks on the server. That’s how I’d do it.
its important that you monitor player velocity as well because jump can be enabled while midair
Will this interfere with jump pads? (including when they have collision off)
Yes, it will interfere if we check velocity, I’ve tried coding infinite jump detection but it is very difficult to do so and can cause false detections. Also Humanoid.Jump triggers when the player holds Space so technically you can trigger it even while anchored mid air or in the ground or wherever you are.
Perhaps you can write a custom movement system with your own functions, that way is the easiest to detect exploits.
My advice would be to just teleport the player back to the last known position and not kick them. You can also add a BindableEvent connected to the script that tells it to ignore the detection for a few frames after getting boosted from a jump pad so he doesn’t get falsely flagged. Do this on the server so clients can’t spoof the value.
I just wanted to add on to this:
You can also detect if a player is infinitely jumping by “flagging” the player and checking the state on their Humanoid.
local Players = game:GetService("Players")
local MAX_JUMPS = 3
local jumpsPerPlayer = {}
local function onJump(player: Player)
local character = player.Character
if not character then return end
jumpsPerPlayer[character] += 1
if jumpsPerPlayer[character] >= MAX_JUMPS then
warn("Kicking", player.Name, "for infinite jumping!")
player:Kick("Infinite jumping.")
end
end
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
jumpsPerPlayer[character] = 0
local humanoid: Humanoid = character:WaitForChild("Humanoid", 2)
if not humanoid then
warn("No humanoid found for", player.Name)
return
end
humanoid.StateChanged:Connect(function(oldState, newState)
if newState == Enum.HumanoidStateType.Jumping then
onJump(player)
-- Check 'Running' because 'Landed' may not always fire
elseif newState == Enum.HumanoidStateType.Landed or newState == Enum.HumanoidStateType.Running then
-- Reset jumps if the player has landed
jumpsPerPlayer[character] = 0
end
end)
humanoid.Died:Connect(function()
-- Free up memory
jumpsPerPlayer[character] = nil
end)
end)
end)
This is an example and you can obviously upgrade it. It is recommended to place this in a server script because the client is exploitable. You should never trust the client.
Yes, I would never use client-sided anti cheat as obvious it is insecure. I enjoy writing anti-cheat, however I have not yet been able to use a successful infinite jump detection. I will try out what you just said, thank you very much