Why can I only jump once?

It was working fine a minute ago??

#pragma strict
var moveLeft: KeyCode;
var moveRight: KeyCode;
var jump: KeyCode;
var moveSpeed: float;
var jumpSpeed: float;

private var isFalling = false;

function Start () {
	
};
 
function Update () {

transform.position.z = 0;

		if (Input.GetKey(moveLeft)) {
			rigidbody2D.velocity.x = moveSpeed *-1;
		}
		else if (Input.GetKey(moveRight)) {
			rigidbody2D.velocity.x = moveSpeed;
		}
			
		else {
			rigidbody2D.velocity.x = 0;
			
		};
		
		if (Input.GetKey(jump) && isFalling == false) {
		rigidbody2D.velocity.y = jumpSpeed;
		isFalling = true;
		}
		
			
};

function OnCollisionEnter() {
		
		isFalling = false;
}

With 2D-physics you have to use OnCollisionEnter2D instead of OnCollisionEnter.