NullReferenceException Please help

I am trying to run this piece of code but then i get an error.

“NullReferenceException
cutTree.Update () (at Assets/Character Controllers/Sources/PrototypeCharacter/Materials/cutTree.js:29)”
This is my code:

var bullitPrefab:Transform;

 

function Start () {

 

 

 

}

 

 

 

function Update () {

 

if(Input.GetButtonDown("placeLog")) {

 

if(Vector3.Distance(GameObject.Find("BigTree").transform.position, transform.position) < 5){

 

Destroy(GameObject.Find("BigTree"));

 

var bullit = Instantiate(bullitPrefab, GameObject.Find("logSpawn").transform.position, Quaternion.identity);

 

}

 

}

 

 

 

 

 

}

Can someone please help me?

Do you have any object named “BigTree”, in the scene?

It’s exactly this
NullReferneceException means that some peice of code is referring to an object (GameObject, value, class, vector, etc) that doesnt exist.

You’ve pasted this same crappy code in the past. You were helped once, and obviously chose to ignore it.