Help with switching Animates

Hello , I made a sword comabt but i found a problem that when I switch the animate of the player(for the anims of sword idle and walk) my normal idle gets gliched
after i destroy the sword animate and active again the normal one the normal idle seems wierd
normal walk to idle :
after i insert and removed the animate to the sword :
after the glich the idle will be normal but for sec it switch back to the sword idle even that i already deleted the sword animate
the Code:
Screenshot by Lightshot
btw how to upload a code to a post in this forum (im new)?

I recommend letting Roblox handle the animation. View this post about replacing the default animations.

Edit: You can past small code like this by doing this: `like this`
You can past big code

like this

by doing this:

like this

1 Like