Script (435653)

Hi can some one help me with script i wanted when i hold or press “w” (when walking,runing) animation plays but it doesn’t stop until i GetKeyUp.

Enjoy!

function Update () {
	if (Input.GetKey("w")  CharacterMotor.grounded) {
		animation.CrossFade ("walk");
	} else {
		animation.CrossFade ("idle");
	}
}

Next time please do a search, this sort of thing comes up in many, many threads.

Thanx