Hi all, here’s my problem. I’ve added an attack animation to my script but the thing is that now only that animation will play. It plays constantly, not when I hit the left mouse button like I want it to. Here is my script.
function Update() {
var walk = Input.GetKey( "w" );
if( walk ) {
animation.Play( "Walk" );
}
if( Input.GetButtonDown ) {
animation.Play( "Attack" );
}
else animation.Play( "Idle" );
}