Pretty much a tool and when you click it plays an animation. Plan for it to do more but I can't because the debounce doesn't work. Pretty much you can spam click and the animation plays as fast as you click. I do not see where I am failing here but i'm lost now. It's in a local script in a tool.
Here it is:
local rep = game:GetService("ReplicatedStorage")
local deb = false
script.Parent.Equipped:Connect(function(Mouse)
Mouse.Button1Down:Connect(function()
if deb == false then
deb =true
script.Parent.Handle.Transparency = 0
animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
animation:Play()
wait(1.2)
script.Parent.Handle.Transparency = 1
rep.Make:FireServer()
end
wait(2)
deb = false
end)
end)
script.Parent.Unequipped:Connect(function()
animation:Stop()
end)
Any help is appreciated

4 comments
use if deb == false then code else wait(2) deb = false
Put the wait(2) and deb = false inside the if statement for the deb
if deb == false then return end
doing deb == false then won't work