Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does my debounce cool down not work for my animation?

Asked by 5 years ago
Edited 5 years ago

Solved

player = game.Players.LocalPlayer
tool = script.Parent
Handle = tool.Handle
debounce = true

tool.Equipped:Connect(function()
    if debounce == true then
        debounce = false
        wait(.1)
        animation = script.Animation
        animation = script:WaitForChild("Animation")
        local IdleTrack = player.Character.Humanoid:LoadAnimation(animation)
        IdleTrack:Play()
        debounce = true
        wait(5)
    end
end)
0
Do "if not debounce then return end" instead of "if debounce == true then". DeceptiveCaster 3761 — 5y
0
I fixed the indentation, and put the code in a code block. TheeDeathCaster 2368 — 5y
0
I fixed it thanks im stupid i should have read the code better there was also 1 more fault i made xxCrownz 0 — 5y

Answer this question