spawning problem

I have a Game object (a cube) that is attached to my player that is a trigger.
I have another cube game object that acts as the spawn point, were the enemy will be instantiated. but it is not working please help me out here or point me in the right direction.

below is the script I am using


//Enemy Prefab

var Enemy : GameObject;

//Trigger that is conected to the player that activates this script

var Spawn_Enemys : GameObject;

//gameobjects position for instantiated enemy

var SpawnPosition : Transform;

function OnTriggerEnter (Spawn_Enemys : Collider)


//Spawns enemy

Instantiate( Enemy); 

//were enemy is instantiated

transform.position = SpawnPosition.transform.position;


Delete the last line(transform.position = SpawnPosition.transform.position;)
and replace:
Instantiate( Enemy);
Instantiate(Enemy, SpawnPosition.transform.position, SpawnPosition.transform.rotation);