Scripting a proper animation handler

(I apologize if I didn’t word this properly, I wasn’t sure how.) What I’m trying to achieve is making a proper and smooth animation handle. I’m making an MMORPG that has several classes, each with their own animations when they hold their weapons. What I want is a way to smoothly handle going from a normal idle or run animation to a combat idle or run (When their weapons are in hand).

My first attempt was to use the “NewAnimation” local script. One script would hold the regular animations and another would hold the animations specific to each class. The issue here is that even if I disable or remove one of the scripts and replace it with the other, the previous animations begin to overlap and interfere with the new ones.

1 Like

I assume you’ve removed the default animation script.

I think you should keep your animations in one script. Because that way it is much easier to control when each of them is turned off and on.

Your issue maybe either from not stopping an animation or incorrectly applying priority to each.

As for smoothly transitioning, from the API page there is a property called weight which controls how much the animation affects the animation rig (Highly useful for programming reactions/injured animations). Use that to introduce each animation and remove others.

5 Likes