:Stop not working for looped animation

It makes db = false but does not stop the animation.

Mouse.Button2Up:Connect(function()
	db = false
	anim.AnimationId = Block
	track = script.Parent.Parent.Humanoid:LoadAnimation(anim)
	track:Stop(0)
	anim.AnimationId = Swing1
end)
1 Like

Can you try this maybe ?

local Humanoid = script.Parent.Parent:WaitForChild("Humanoid" ,5)

if Humanoid ~= nil then
	Mouse.Button2Up:Connect(function()
		for _, Anim in pairs(Humanoid:GetPlayingAnimationTracks()) do
			Anim:Stop()
		end
	end)
end
1 Like

Dosent work EDIT: works once then nothing works

1 Like