What is wrong with my script?

#pragma strict

var rotationSpeed = 100;
var jumpHeight = 8;

private var isFalling = false;

function Update ()
{

//handle ball rotation
var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed; 
rotation *= Time.deltaTime;
rigidbody.AddRelativeTorque (Vector3.back * rotation);

if (Input.GetKeyDown(KeyCode.W));
{
    rigidbody.velocity.y = jumpHeight;
}

}

Probably the same issue as this one: An object reference is required for non-static field, method, or property - Questions & Answers - Unity Discussions

In your case use RigidBody instead of RigidBody2D.