Can't get the ball to jump more than once

I’m a bit of a beginner with Unity and I have this short script to move a ball around with WASD and cause it to jump by hitting the space key, but I can’t get the ball to jump more than once.

#Here is what I have

function Start() {
GetComponent.().drag = 1;
}

var jumpHeight = 8;

private var isFalling = false;

function Update () {

//Sets up keys to move the ball
var ballRotationX : float = Input.GetAxis ("Horizontal") * 2000;
var ballRotationZ : float = Input.GetAxis ("Vertical") * 2000;	

ballRotationX *= Time.deltaTime;
ballRotationZ *= Time.deltaTime;

GetComponent.<Rigidbody>().AddTorque(ballRotationX, 0, ballRotationZ);

if (Input.GetButtonDown("Jump") && isFalling == false) {
	GetComponent.<Rigidbody>().velocity.y = jumpHeight;
	isFalling = true;
}

}

function onCollisionStay ()
{
isFalling = false;
}

What I think happens is “onCollisionStay” is not called, and “isFalling” is forever true after the first jump.

I suppose you have your colliders/rigidbodies set up correctly, so I think the problem is that you have the wrong signature for the method, so it is not found via reflection. You are missing the Collision argument.

Use the correct signature: “function OnCollisionStay(collisionInfo : Collision){…}”

Documentation here.