Animation optimization & fixes

So as far as I can tell this is what’s happening:

When you replace the default Animate script it has already started some animations - usually idle. So when your new script destroys the old one it neglects to stop the animations the old script has started.

I’m not really sure if there’s a better way to replace the default Animate script (cc @CodeWriter) but a possible workaround would be to do this after you get the Humanoid object in your new script:

for _,v in pairs(Humanoid:GetPlayingAnimationTracks()) do v:Stop(0) end
1 Like