Prefab to spawn on right spot

I wanted my prefab to spawn over and over again and used this --> http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.InvokeRepeating.html

It's works almost perfect - The Prefab spawns over and over again but now on the right spot...

I created a new "GameObject" and added the script but the prefab spawns all over the map - Anyone know how I can fix this?

You need to define a spawn point and pass the position of it to the Instantiate function. To do so simply create an empty gameobject and rename it as "SpawnPoint" and then place it where you want your prefabs be instantiated from. Then in your script do this:

var spawnPoint:Transform; //assign "SpawnPoint". 

function LaunchProjectile () {
    var instance : Rigidbody = Instantiate(projectile, spawnPoint.position, Quaternion.identity);

//To Shoot in random directions:
    instance.velocity = Random.insideUnitSphere * 5; //This is causing it to shoot all over the place. cause it's spawning in random directions. whereas if you want a defined direction you would use next line instead.

//To have a predefined direction use this line:
    instance.velocity  = spawnPoint.forward * 5; //make sure the forward axis of the spawn point gameobject is looking at your desired direction. 

}