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

0

Do "if not debounce then return end" instead of "if debounce == true then".

0

I fixed the indentation, and put the code in a code block.

0

I fixed it thanks im stupid i should have read the code better there was also 1 more fault i made