i have this script to make a animation play and the debounce in it isnt work as you can click again and restart the animation while its still playing
script.Parent.Equipped:Connect(function(Mouse)
Mouse.Button1Down:Connect(function()
local debounce = true
if debounce == true then
debounce = false
animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
animation:Play()
wait(0.51)
debounce = true
end
end)
end)
script.Parent.Unequipped:Connect(function()
animation:Stop()
end)
