#stopping previous animation at the beginning of script

1 messages · Page 1 of 1 (latest)

hardy storm
#

i have these items that do a pose when u click but they over lap when u click multiple times or use another pose. how do i make it so it stops the previous animation before starting the new one?

this is my code:

anime = script.Parent.name.Value


script.Parent.Selected:connect(function(m)
    m.Button1Down:connect(function()
         hum = game.Players.LocalPlayer.Character.Humanoid
         anim_feet = hum:LoadAnimation(script.Parent.Animation)
        current = anim_feet
        current:Play()
    end)
end)
oak gust
#

We wont be able to read your code like this

#

But why are you using humanoid to load animation

rich spear
#

welp

rich spear
manic loom
rich spear
#

also naming a child instance name dang

manic loom
#

hum:GetPlayingAnimation

#

or GetPlayingAnimationTracks

#

i cant remember

rich spear
hardy storm
hardy storm
eager eagleBOT
#

studio** You are now Level 2! **studio

manic loom
#

stop the animation track when the tool is unequipped

hardy storm
manic loom
#

do the thing i mentioned before

#

Get all playing animations and stop them one by one

hardy storm
manic loom