Having problems with my jumping for my ball character. It jumps infinte times.

I’ve tried using other peoples solutions, but they’re either outdated and not formatted right for my version of unity or they just dont work for me.
#pragma strict
var rotationSpeed = 100;
var jumpHeight = 8;

private var isFalling = false;

function Update () 
{
	//Ball Rotation 
	var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
	rotation *= Time.deltaTime;
	GetComponent.<Rigidbody>().AddRelativeTorque (Vector3.back * rotation);
	if (Input.GetKeyDown(KeyCode.W) && isFalling == false) {
		Rigidbody.velocity.y = jumpHeight;
		isFalling = true;
	}
}

function onCollisionStay ()
{
	isFalling = false;
}

The solutions you found are not outdated or formatted incorrectly. It’s just that they’ve declared OnCollisionStay(col : Collision ) correctly, with a capital “O” and the correct parameter signature.

It’s all in the manual…