Animation set switching not working?

  1. What do you want to achieve?
    I have an Animation switching script on the server side that replaces the current Animate script inside a player Character with the same Animation script (with different Animation IDs) , every time a Tool is equipped.

  2. What is the issue?

The issue is that whenever I try to revert back to the normal idle animations when the tool is unequipped, the animation is malformed.
Before equipping weapon and switching animations:
(https://gyazo.com/a78d8458a87fc8b3d7e3798a2a361661)
(This is what the animation is supposed to look like.)

After unequipping weapon and switching back animations:
(https://gyazo.com/71c002ceafdd4538cb9984db8cf77ed6)
(This is not what the animation is supposed to look like.)

The kicker about this problem is that the animations look totally fine to another player, but on the client’s side, they look malformed like this.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I’ve tried flushing previous animations on the client using GetPlayingAnimationTracks, resetting the transforms of Motor6Ds on the client, most of everything I can think of. Should I be doing the Animate script switching on the client, or am I doing it wrong?