Animation is Stuck via Script, PLEASE HELP

Hi there and thank you for your time.

I have a weapon switching system in my game and a melee system. Whenever I want to swap weapons my animation gets stuck at the location where it was when I was changing my weapon. So for example if my player was swinging the bat it would get stuck at the location of swinging when I move back to that weapon. I have been trying to mess about with this for a while now and is more than likely something simple that I have overlooked.

If anyone could help me I would be really appreciative,

Thank you.

You’re going to need to post your code if you want any help. Don’t forget to put it as a code block.