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)

3 comments
Do "if not debounce then return end" instead of "if debounce == true then".
I fixed the indentation, and put the code in a code block.
I fixed it thanks im stupid i should have read the code better there was also 1 more fault i made