Random.Range Generating Assigned Value

Everytime I play my scene, I only get 1 as the generated number. When I change the value in the inspector, it sticks as that. Any help is appreciated. Thanks as always.

var number : float;

function Update () {

number = Random.Range (1,2);

Debug.Log (number);

if (number >= 1) {

animation.Play("spikeyMoveJump");

}

else {

animation.Play("spikeyMoveFall");

}

}

Description

Returns a random integer number between min [inclusive] and max [exclusive] (Read Only).

The key point here is the maximum value is exclusive.

So your value will always be 1. If you want 1 or 2, use

number = Random.Range( 1, 3 );