Hey folks, im sorta clueless about what´s going on here, at first i made my code based on this sample from the scripting reference but it just keept giving me a “BCE0019: ‘transform’ is not a member of ‘Object’.” error.
Then i realised my code was just like the one from the scripting reference and tried theirs, for my surprise it takes me to the exact same error.
var respawnPrefab : GameObject;
var respawns;
function Start()
{
if (respawns == null)
GameObject.FindGameObjectsWithTag ("Respawn");
for (var respawn in respawns)
Instantiate (respawnPrefab, respawn.transform.position, respawn.transform.rotation);
}
Im trying to find a couple of objects with a tag and instantiate a prefab in each one of them.