Script problem

Hey! I’m new to unity, so why does this script not work. I’ve asked this question already but the question died, so I’m posting it again with more details.

var speed = 7.0; var rotateSpeed = 3.0;

function Update ()
    var controller : CharacterController = GetComponent(CharacterController);transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);
    var forward = transform.TransformDirection(Vector3.forward);
    var curSpeed = speed * Input.GetAxis ("Vertical"); controller.SimpleMove(forward * curSpeed);

    if (Input.GetButtonDown("Jump"));rigidbody.AddForce (Vector3.up * 200);

} ;

The movement part works, but jumping doesn’t. No errors, it just doesn’t add speed to the character gameobject I want the script to add force to my game object, so that it acts like a bird, you know when spacebar is tapped, the character flaps its wings and like…
And yes, I have a rigidbody and no, it’s not set to kinematic.
Please help! Thanks.

Don’t place “;” after your if statement in line 10:

 if (Input.GetButtonDown("Jump")) rigidbody.AddForce (Vector3.up * 200);

Try Input.GetButton(“Jump”), because GetButtonDown(“Jump”) only returns true on the frame that button started to be held down. If the player keeps holding it down, it won’t return true.