When i press the key to run the animation it pauses my game! HELP!

Hello everyone i need help with a problem i made a walking animation so when i am going to press a certain key like W on the keyboard. But when i press the key my game pauses itself. i dont get into scene again i am paused but the game is running somehow. Here is the script.

function Update() { if(Input.GetKeyDown(“w”)) { // Plays the walkanimation animation - stops all other animations animation.Play(“walkanimation”, PlayMode.StopAll); } }

How to fix? I am making a fps game!. Please help! And its like the script is making it.Cuz the animation is running automatically in game with no script.But when i insert the script it runs the same but when i want to press the key that makes me go forward the games pauses but its still running somehow! Please help! And please add me on Skype Niklas7715 Thanks!

PlayMode.StopAll

/\ That’s the problem