help with a short script?

i’ve been trying to make this script and im stuck, im trying to get my little sphere to shoot a fireball but it spawns it but doesn’t shoot out and then i get this error.
object reference is not set to an instance of an object
and
an instance of type unityengine.transform is required to access non static member forward.
anyways heres the script.any help would be greatly appreciated

var speed = 3.0;

var rotateSpeed = 3.0;

var bullitPrefab:Transform;

function Update ()

{

    var controller : CharacterController = GetComponent(CharacterController);



    // Rotate around y - axis

    transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);



    // Move Forward / backward

    var forward = transform.TransformDirection(Vector3.forward);

    var curSpeed = speed * Input.GetAxis ("Vertical");

    controller.SimpleMove(forward * curSpeed);



    if(Input.GetButtonDown("Jump"))

    {

       var bullit = Instantiate(bullitPrefab, 

                    GameObject.Find("spawnPoint").transform.position,

                    Quaternion.identity);;       

       bullit.Rigidbody.AddForce(Transform.forward * 2000);

    }  

}

@script RequireComponent(CharacterController);

Did you connected the prefab to the script on the inspector panel? everything else seems to be ok, will know more shortly when i have unity up and running again and make some tests.

im not sure what you mean,im still a newbie.do you mean did i drag the “fireball” prefab to the script? yes.under the sphere it lists the script named moveAround as posted above and it says
script movearound
speed 7
rotate speed 3
bullit prefab fireball (transform)
if this is what you mean of course.
sorry im still a complete nub :smile:

You’re using Transform.forward in the last line of your Update function. Use lowercase if you’re talking about the tranform of the GameObject that the script is attached to. (transform.forward)