Animation looping from idle to walk and back to idle,Animation looping from idle to walk and back to idle.

Whenever I start walking I walk around stuck in my idle animation. And in the animation tab I can see the transitions going between walk and idle looping around.

Heres my script and any help will be greatly appreciated. I’m super new to this and don’t know what I’ve done really lol. Any other tips on how to improve the code appreciated.
,Whenever I start my game I can see my idle animation and when I start to walk my character starts walking but with the idle animation and in the animation controller I can see my transitions activating to the walk and then back to my idle. I’m not sure what I’ve done wrong some help would be greatly appreciated.

My movement and animation script

you could play around with crossfade instead of using floats…
Unity - Scripting API: Animator.CrossFadeInFixedTime (my favorite way of dealing with animations)