Can someone tell me why my idle animation just doesn't stop when I die and unequipped it? I even put this at the end of the local script for the animations.
problem: doesn't stop the idle animation when I die then unequip it. the idle animation is looped and the priority is idle.
code:
tool.Unequipped:connect(function()
local hum = char:WaitForChild("Humanoid")
for _,anim in pairs(hum:GetPlayingAnimationTracks()) do
anim:Stop()
end
end)
can someone please fix this?

18 comments
omg pls use Connect damnit
omg pls use Connect damnit
Where are you loading the idle animation?
I put the animations inside the local script.
not seeing what char is maybe because you have not defined it?
Ok so _,anim is not a good, please use a variable like k,anim
I didn't show the whole script since its pretty hard tryna code block.
But I defined what char is at the beginning of the local script. local char = plr.Character or plr.CharacterAdded:wait()
so any solutions?
um.. I still got the problem
I would just do a script like this:
tool.Unequipped:Connect(function()
anim:Stop()
end)
could you describe it to me on answer?
well that wouldn't stop the idle animation.
hey um... I still need some help.
hello???