walk animation script

Hello
I have made a cool model with animations for: walk, attack and idle.

ive tried so many scripts to make them play ingame but non of them work all with many errors (all old posts)

only thing missing is this script for animations i cant seem to find out how to do it…

just need a script to say
press “w,a,s,d” ->play Walk animation
Stand still → play idle animation
Press space → Attack animation

pleace help :slight_smile:

Learn Mechanim via official youtube tutorial (takes 1 hour) and save yourself a lot of pain, forever.