JavaScript: Animation on button Help.

I’m trying to get aiming in my game (By holding down Right Mouse to aim). But I’m a noob at scripting and trying to learn. Can anyone tell me what I did wrong? Please and thanks!

var aim : AnimationClip;

function Update () {
	if(Input.GetMouseButtonDown(1));
	AnimationPlayMode.aim; 
}

This would only return true in the frame the right mouse button was pressed down; you want GetMouseButton (true the whole time it’s being held down)

Check your animation call too