So I’m trying to make a walk effect to the camera when I press either W or S, but it dosen’t really work. Here is my script, is there anything wrong here?
var Player : GameObject;
function Update () {
if(Input.GetKey("w")){
Player.animation.Play("Walk");
}
if(!Input.GetKey("w")){
Player.animation.Stop("Walk");
}
if(Input.GetKey("s")){
Player.animation.Play("Walk");
}
if(!Input.GetKey("s")){
Player.animation.Stop("Walk");
}
}