#How would i add a cooldown to this dubble jump script?

1 messages · Page 1 of 1 (latest)

waxen vigil
#

local UIS = game:GetService("UserInputService")
local CanDoubleJump = true
local CanSetCanDoubleJumpToTrue = false
local Character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()

UIS.JumpRequest:Connect(function()
if CanDoubleJump then
Character:WaitForChild("Humanoid").JumpPower = Character:WaitForChild("Humanoid").JumpPower * 1
Character:WaitForChild("Humanoid"):ChangeState(Enum.HumanoidStateType.Jumping)
local Animator = Character:WaitForChild("Humanoid"):FindFirstChild("Animator") or Instance.new("Animator",Character:WaitForChild("Humanoid"))
Animator:LoadAnimation(script.Flip):Play()
CanDoubleJump = true
end

end)

tidal coral
waxen vigil
#

how tho?

tidal coral
#

you make a variable in the first lines of your script

waxen vigil
#

like example

tidal coral
#

you can name it to whatever you want

#

and when you jump you check if debounce is true or false

#

if it's true then jump and set to false , wait an amount of time then set it to true again

#

if false then do nothing

waxen vigil
#

How thi

tidal coral
#

google it bruh

obtuse sandal
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

full nexus