[Help!]Messing around with Detonator but got this error...

NOTE: Detonator is a Unity explosion Prefab. BEWM! :smile:

I got this error:

GameMain.js is this:

var detailLevel : float = 1.0;
public var currentDetonator:GameObject;
var explosionLife : float = 10;

function Update () {
if (Input.GetMouseButtonDown(0)){
SpawnExplosion();
}
}

function SpawnExplosion()
{
		var ray = Camera.main.ScreenPointToRay (Input.mousePosition);

var hit : RaycastHit;
			if (Physics.Raycast (ray, hit, 1000)) 
			{
				var offsetSize = currentDetonator.GetComponent("Detonator").size / 3;
				var hitPoint = hit.point + ((Vector3.Scale(hit.normal, Vector3(offsetSize,offsetSize,offsetSize))));
				var exp : GameObject = Instantiate (currentDetonator, hitPoint, Quaternion.identity);
				exp.GetComponent("Detonator").detail = detailLevel;
			}
			Destroy(exp, explosionLife); 

}

Could someone just explain the cause of the error? :x

Have you forgotten to assign an object to the script in the inspector? That’s typically the cause of that error message.