So I want to stop all current animations (also emotes) before freezing the character so it doesn’t have a weird pose.
However, things like GetPlayingAnimationTracks are deprecated. How should I do it?
Just because a function is deprecated, it doesn’t mean you shouldn’t use it. GetPlayingAnimationTracks is very useful for me and what I am coding right now.
But is there any other way? It is stated that it shouldn’t be used for new work.
GetPlayingAnimationTracks is only deprecated if it’s done from the Humanoid, the recommended way is to use the Animator, a class added into your Humanoid
for _,anim in pairs(Humanoid.Animator:GetPlayingAnimationTracks()) do --Do stuff on every animation, in your case, you just need to do anim:Stop() --Since each is an animation track end
Ahh I see, thank you very much!