Javascript error help. Pleasseee :) .

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);
    }
}

@script RequireComponent(CharacterController)   

Can someone please tell me where I went wrong. I am getting the NullReferenceExeption error message. Thank you very much

When posting a question with an error it is helpful to include the error message from the console. In particular, it is helpful to know what line the error occurred on. Reading the code, the most likely problem is the GameObject.Find(). If it is failing, then you will get this error. Note that case matters, so “spawnPoint” != “SpawnPoint” != “Spawn Point” != “spawnPoint (clone)”, etc.