#How to disable Spam-Jumping

1 messages · Page 1 of 1 (latest)

sudden hatch
#

sad the title says I need the player to only jump once per click

hollow pelican
#

wdym per click

past jackal
#

aka. spam-jumping

naive mantle
#

put a local script inside StarterPlayer > StarterChracterScripts

local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
Character = Player.Character or Player.CharacterAdded:Wait()
jump = (put base jump height here)
jumpOnCd = 0
Humanoid = Character:WaitForChild("Humanoid")

UserInputService.InputBegan:Connect(function(input, gameProcessed)
if input.KeyCode == Enum.Keycode.space then
Humanoid.JumpHeight = jump
task.wait(0.1)
Humanoid.JumpHeight = jumpOnCd
task.wait(PUT HOW LONG YOU WANT IT TO BE)
Humanoid.JumpHeight = jump
end
end
end)

i havent tested it but its probably a good starting point

#

This worked for a running script I made but I tweaked it so it would run jump height

carmine shuttleBOT
#

studio** You are now Level 1! **studio

mild remnant
naive mantle
#

Then make the jumpOnCd permanent and put a release KeyCode statement to reset the jump height

#

I have a statement like that but I don’t remember it rn

mild remnant
#

saw u typing

#

come back

naive mantle
# mild remnant but thats just a cooldown, he wants 1 jump per spacebar press instead of jumping...

put a local script inside StarterPlayer > StarterChracterScripts

local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
Character = Player.Character or Player.CharacterAdded:Wait()
jump = (put base jump height here)
jumpOnCd = 0
Humanoid = Character:WaitForChild("Humanoid")

UserInputService.InputBegan:Connect(function(input, gameProcessed)
if input.KeyCode == Enum.Keycode.space then
Humanoid.JumpHeight = jump
task.wait(0.1)
Humanoid.JumpHeight = jumpOnCd
end
end
end)

UserInputService.InputEnded:Connect(function(input, gameProcessed)
If input.KeyCode == Enum.KeyCode.LeftShift then
Humanoid.JumpHeight = jump
End
End

#

That should work

naive mantle
mild remnant
naive mantle
#

It’s reset once you release the spacebar