Flight Script throws no errors but does nothing.

I’m making a game in which the player can fly, but my script is not working. It seems correct, throws no errors, but still does nothing. It looks like this:

#pragma strict

static var jumpHeight = 100000000000;

private static var flightParent : GameObject;

Debug.Log ("Flying");

public static function fly () {

var flightRigidbody : Rigidbody[];


	if(flightParent == null) {

		flightParent = GameObject.Find("FPSController");
		Debug.Log ("Found Player to Fly");
	}

	flightRigidbody = flightParent.GetComponents.<Rigidbody>();

	for (var parentFlight : Rigidbody in flightRigidbody) {

		Debug.Log ("You Flapped your Wings");
		parentFlight.velocity.y = jumpHeight;
		Debug.Log ("Succesfull flight");

	}
}

and is being called by:

if (Input.GetKey(KeyCode.Space))
	{
		if (MainScript.flying == true)
		{
			FlightScript.fly ();
		}	
	}

All Debug.Logs are being thrown successfully. It may be noteworthy that the standard FPSCharacter is also being used in this project.

Manually modifying the components of the velocity vector is a bad idea.

Use the provided AddForce function from the Rigidbody component.

Are you using any animation on it? Like there must be any animator attached to the character which stops it doing so. Add a animation or try it removing animator.