#is it possible to stop an animation that played from a script with a different script

1 messages · Page 1 of 1 (latest)

marble wadi
#

So i have an animation that played from Script1 and I need to stop it from Script2 and not from Script1. Does anyone have any idea how?

storm plinth
#

just same as you :play, but :stop.

#

maybe check if its also playing, then stop

marble wadi
#

I did ```local char = plr.Character
local hum = char:FindFirstChild("Humanoid")
local anime = script.Animation

local AnimPlay = hum:LoadAnimation(anime)
AnimPlay:Play()```
latent dome
#

Two ways, either use module scripts and store loaded animations into a table or use the get playing animation tracks method within the animator and loop through them and stop the one with the right name.

cursive pantherBOT
#

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

silent stump
#

animator:getplayinganimationtracks or whatever its called

marble wadi
#

Ok Ill see the animator thing