Find all gameobjects with a tag, and instantiate a prefab at each one of them

I do know how to find gameobjects with tag / name, but I can’t figure out how to find all gameobjects with a tag, and then instantiate a prefab at each one of them… ?

This must be a fairly easy task, but I’m a little stuck with this. Somebody give me hand?

Start with this:

http://unity3d.com/support/documentation/ScriptReference/GameObject.FindGameObjectsWithTag.html

It will give you all gameobjects with a tag. Then you can loop through and get their transform.positions.

Then use

http://unity3d.com/support/documentation/ScriptReference/Object.Instantiate.html

to make your prefabs at the locations. Straight from the documentation on the page I linked to:

// Instantiates respawnPrefab at the location
// of all game objects tagged "Respawn".

var respawnPrefab : GameObject;
var respawns = GameObject.FindGameObjectsWithTag ("Respawn");
for (var respawn in respawns)
Instantiate (respawnPrefab, respawn.transform.position, respawn.transform.rotation);