Why isn't this jumping script working?

#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;
GetComponent.().AddRelativeTorque (Vector3.back * rotation);

if (Input.GetKeyDown(KeyCode.W)>;
(
 GeyComponent..velocity.y = jumpHeight;
)
}

Next time, please use the code formatting button to make your script presentable. It makes it much easier for others to read.

Additionally, you should not expect others to simply do your work for you. You did post your script, and that’s good, but rather than saying “This doesn’t work” and throwing a script our way, you should present your problem more respectfully; show us that you care and that we should care.

That said, there are quite a few reasons why your script no longer functions when you try to jump:

if (Input.GetKeyDown(KeyCode.W)>;

This line alone is a mess. Ending parenthesis are replaced with a “greater than” (>) symbol and there is a semi-colon at the end of the line. Even if the parenthesis were there, your if statement would be concluded and no activity would take place.

Following this is the body of the if statement:

(
  GeyComponent..velocity.y = jumpHeight;
)

The use of parenthesis () rather than curly braces {} surrounding the contents will do no good in performing the action. Then, the contents also contain misspellings and erroneous construction of “GetComponent()”.

You should stop and take a look at the documentation for the scripts you’re implementing, as well as digging around and experimenting in various tutorials to learn more of what you can do and how to accomplish it.

Change this:

GetComponent.().AddRelativeTorque (Vector3.back * rotation);

To this:

GetComponent(Rigidbody).AddRelativeTorque(Vector3.back * rotation);

And change this:

if (Input.GetKeyDown(KeyCode.W)>;
 (
  GeyComponent..velocity.y = jumpHeight;
 )

To this:

if (Input.GetKeyDown(KeyCode.W))
     GetComponent(Rigidbody).velocity.y = jumpHeight;

It is obvious that you have a very weak grasp on programming in general. I recommend learning how to program in C#, not in Javascript. Also, don’t start with Unity. Start doing general programming, not game programming. Search “C# programming tutorials”