object not spawning but no error message

im trying to get a gameobject to spawn using these 2 scripts

(my trigger script)

function Update () {

//if(Input.GetKeyDown(“t”))
ToggleTrigger();

}

       function ToggleTrigger () {
if (collider.isTrigger == true) {
		collider.isTrigger = false;
		print("Close");
}
else{
		collider.isTrigger = true;
		print("Opened");
}
         }

and

(my send message/spawn script)

var sendToObject: GameObject;

var correctObject: GameObject; //this is the only object we allow to trigger the event

var targetFunction: String; // the name of the function to call

var prefab: Transform;

function OnTriggerEnter (object : Collider) {

   if(object == correctObject.collider) 
   		sendToObject.SendMessage("targetFunction");
   		Instantiate (prefab, Vector3(0, 0, 0), Quaternion.identity);
}

function OnTriggerExit (object : Collider) {

   if(object == correctObject.collider) 
   		sendToObject.SendMessage("targetFunction");
}

my issue is that my game runs with no errors but my prefab is NOT spawned, ive checked http://unity3d.com/support/documentation/ScriptReference/Object.Instantiate.html & http://unity3d.com/support/documentation/Manual/Instantiating%20Prefabs.html sections of unity for help and but to no real avail can any one help me?

The thing is, you don’t have braces around that if. It should do the Instantiate-method regardless of what hits it. Are you sure your colliders are set correctly for the trigger events to happen?

I cannot see the targetFunction method anywhere. Try reading through this