Animation Problem

i cant play my animation of the character at first the character didn’t recognize the animation so i put it in the animation list no error found but no animation played?
i use this script

if(Input.GetKey("w")){
animation.Crossfade("walk")
}

I have No errors and no work animation like no script
and how can i play an animation before anther animation getting start when i press a key?

Hi, just enable your loop checkbox on your walkanimation in the inspector, then use this Script instead.

var play : boolean = false;

function Update(){
    if(Input.GetKeyDown("w"))
        play = !true;

    if(play)
        animation.Play("walk")
}

i hope this helps :).