Action animation last forever

hello I created a tool and when the tool is active it will run the tool action animation, but somehow the animation ends forever, I just want this action animation to play 1x anyone knows how to fix it?


	if tool.Enabled then

		tool.Enabled = false

		slashing = true

		Char.Human:LoadAnimation(script[Char.Human.RigType.Name.. "RightSlash"]):Play()

		sounds.Slash:Play()

		wait(0.5)

		slashing = false

		wait(Cooldown)

		tool.Enabled = true

	end

end)

gambar

Is the animation looping? You can use Animation:Stop() to stop an animation whenever you need to.

when the tool is unequipped, you got to use animation:Stop() function to stop it