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

1

omg pls use Connect damnit

1

omg pls use Connect damnit

1

Where are you loading the idle animation?

0

I put the animations inside the local script.

0

not seeing what char is maybe because you have not defined it?

0

Ok so _,anim is not a good, please use a variable like k,anim

0

I didn't show the whole script since its pretty hard tryna code block.

0

But I defined what char is at the beginning of the local script. local char = plr.Character or plr.CharacterAdded:wait()

0

so any solutions?

0

um.. I still got the problem

0

I would just do a script like this:

0

tool.Unequipped:Connect(function()

0

anim:Stop()

0

end)

0

could you describe it to me on answer?

0

well that wouldn't stop the idle animation.

0

hey um... I still need some help.

0

hello???