I don't understand this AddForce error I'm getting.

I’m pretty new to this, and actually almost completely new to javascript, but I’m trying to learn through experience and I’m already having trouble. A day ago I’d gotten AddForce to work properly in CSharp, but I’ve changed my mind and decided to go through javascript instead, and I can’t really get it to work. I was watching some videos earlier today and they said it was a good idea to cache a function for optimization, so I wrote it exactly how they did. Here’s my script:

#pragma strict

private var MyRig = Rigidbody;

function Start () {

}

function FixedUpdate () {
var balljump = Input.GetKeyDown(KeyCode.Space);

if(balljump){
MyRig.AddForce(transform.up * 50);
}

}

I’ve tried rewriting it to exclude the variable cache, and it still didn’t work. The error I keep getting is:

Assets/Scripts/Ballcontrol.js(13,7): BCE0019: ‘AddForce’ is not a member of ‘System.Type’.

Declare type of variable:

private var MyRig : Rigidbody;

function Start () {
     MyRig = Rigidbody;
}

I’m getting a different error now,

“Assets/Scripts/Ballcontrol.js(9,14): BCE0022: Cannot convert ‘System.Type’ to ‘UnityEngine.Rigidbody’.”

My current script:

#pragma strict

private var MyRig : Rigidbody;

function Start () {

MyRig = Rigidbody;

}

function FixedUpdate () {
var balljump = Input.GetKeyDown(KeyCode.Space);

if(balljump)
{
MyRig.AddForce(transform.up * 50);
}

}

Use code tags, please.

?

#pragma strict

function FixedUpdate () {
var balljump = Input.GetKeyDown(KeyCode.Space);

if(balljump)
{
rigidbody.AddForce(transform.up * 50);
}

}