Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I stop an item equip animation when I remove the item that started it from the player?

In the game, I give the player an item that is removed once the game ends. If the player has the item out when the game removes the item from him, the animation of him or her holding the item continues to play. How do I force this animation to stop?

1 answer

animTrack:Stop()

whatever variable animTrack is

3 comments

0

That is helpful. What about a variable for "Stop" >;3

0

local stop = "hi"

0

@GlassWindow I did do that: (1) tool.Unequipped:connect(function() (2) if loadedidleanim then (3) loadedidleanim:Stop() (4) local humanoid = tool.Parent.Parent.Player.character:FindFirstChild("Humanoid") (5) ActivePlayerAnimations = humanoid:GetPlayingAnimationTracks() (6) for c,v in pairs(ActivePlayerAnimations) do(7) v:Stop() (8) end (9) end end)

This discussion is preserved as it was. New answers, comments, and votes are closed.