ANIMATING while MOVING. UNITY C#

Hi, I’m having this problem with my game. I want to make my player move when i press a button but i also want the player to animate at the same time. **So far i’ve got this : ** when i press a key my player is just doing the animation but not moving. But in the if statement i also put transform.position = transform.position + new Vector3 (-2, 0, 0); but in some way it seems like the animation is killing that command.

So i want my players transform.position to + 2 but i won’t it’s just animating when im pressing.

Yes, here is the animation controller script:

The player move script ( some of it )56325-unity.png

and the animator window, i’ve got a bool parameter as you can see in the code. Just tell me if you need more.