Hello. Here is my code:
var NormalBall : Rigidbody;
var BonusBall : Rigidbody;
function Start () {
}
function SpawnBall(){
var choice = Random.Range(1, 6);
if (choice == 1){
TypeOfBall = BonusBall;
}
else {
TypeOfBall = NormalBall;
}
var clone : Rigidbody;
clone = Instantiate(TypeOfBall, transform.position, transform.rotation);
}
It is supposed to randomly pick one of two balls to spawn and do so from a game object that this script is attached to. I have both balls set in that game object, but it is not spawning them. Any ideas? Thank you!