local char = script.Parent local hum = char:WaitForChild("Humanoid") local uis = game:GetService("UserInputService") local jumps = 0 local maxJumps = 2 local currentTick = tick() hum.StateChanged:Connect(function(oldState, newState) if newState == Enum.HumanoidStateType.Landed then jumps = 0 end end) uis.JumpRequest:Connect(function() if jumps < maxJumps and tick() - currentTick > 0.2 then jumps += 1 currentTick = tick() hum:ChangeState(Enum.HumanoidStateType.Jumping) end end)