local cooldown = 5
local Debounce = false
local player = game.Players.LocalPlayer
local anim = game.Workspace --your animation location
local human = player.Character:FindFirstChild("Humanoid")
local playAnim = human:LoadAnimation(anim)
script.Parent.Activated:Connect(function()
if Debounce == false then
Debounce = true
playAnim:Play()
wait(cooldown)
Debounce = false
end
end)
Just want to point out that using Humanoid:LoadAnimation is deprecated.
It has been moved into the child of Humanoid with an Instance called Animator
So the new “updated” version is Humanoid.Animator:LoadAnimation you will run into replication issues with Humanoid:LoadAnimation