How to stop animation when ending - help

I didn’t edit the player, try the updated one now

i have an problem

here an video idk what happened
the animation didnt end where supposed to be and ended up like that
its also happened when i click other animations

You are supposed to edit the code to work perfectly to your system, not just copy paste it tho.

What do i have to do to fix this kind of problem?
cause im not a scripter

I need someone else to help me out
cause im not an scripter and i cant understand how to fix it