local tool = script.Parent
local debounce = false
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://7226679754" --Put your animation id here
if not debounce then
local track -- Play animation
tool.Activated:Connect(function()
track = script.Parent.Parent.Humanoid:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Action
track.Looped = false
track:Play()
debounce = true
print("anim played")
wait(0.5)
debounce = false
end
)
tool.Unequipped:Connect(function() --Stop animation
if track then
track:Stop()
end
end)
end
The main part is the debounce all it does is say anim played but i can still spam click and the animation plays every time

2 comments
tysm dude
more questions can be asked on discord, Blue Duck#8344