#Animation not stopping
31 messages · Page 1 of 1 (latest)
(Starting the animation)
local AnimationTrack = Humanoid:LoadAnimation(ShovelAnim)
AnimationTrack:Play()```
(Trying to stop it)
local AnimationTrack = Humanoid:LoadAnimation(ShovelAnim)
AnimationTrack:Stop()```
When I try to stop the animation, I have made it so something fires an event and in that event it stops the Animation, could this be the reason why it wont stop?
easy mistake you are loading it twice
an animation only needs to be loaded once and stopped by just referencing the one u loaded to start
so instead of stopping it and going local animationtrack = humanoid etc
just simply put AnimationTrack:Stop()
Ahh makes sense, can’t believe I didn’t think of that 🤦♂️
Yeah
if they aren't its nothing to worry about u can just use a for loop
and stop all the animations playing on the player
good rule of thumb now is to use Humanoid.Animator:LoadAnimation now
humanoid animations are depracated and can be unreliable
Is that where you would add the animation inside the script?
yeah instead of
local AnimationTrack = Humanoid:LoadAnimation(ShovelAnim)
u would do
local AnimationTrack = Humanoid.Animator:LoadAnimation(ShovelAnim)
Yeah
more recent instance to load animations on
Awesome, I'll change that now
u can still use depracated stuff but its best to just use the latest stuff
in case roblox goes like sicko mode and removes it entirely lol
hope that helped
Yeah it did, thank you!
i tried this for loop for stopping the animation but it doesnt work
its been moved to humanoid.animator