prefab wrongly instantiating at 0,0,0

The Problem:
I’ve been having trouble getting a projectile prefab to instantiate at the projectile launcher game object. Each time I ran the game, the projectile instantiated somewhere very close to 0,0,0, no matter what I set the origin to in playMaker.

What I’ve tried so far:
I thought I might be doing something wrong with playMaker. To prove my suspicion,I set up a clean project, excluding playMaker. I got two simple scripts from
this YouTube video , one which instantiates a missile, and a homing script, on the missile itself, which positions the missile and guides it to a preset target.

In the tutorial the instantiation script, attached to the Main Camera, instantiates the missile on the Main Camera, and the homing script, attached to the missile, guides it to the target.

In my version, the instantiation script, attached to the Main Camera, instantiates the missile at 0,0,0 (just like the BowLauncher script had been doing in my game scene), and the homing script, attached to the missile, causes the missile to vibrate back and forth, going nowhere in particular.

The script on the YouTube video isn’t very clear. Perhaps I mistranscribed it. Here’s what I’ve used:

#pragma strict
var Speed : float;
var Turn : float;

function Update () 
{
	var targets : GameObject[] = GameObject.FindGameObjectsWithTag("target");
	//This variable populates an array of all game objects in the scene that have been labeled "target".
	var closest : GameObject;
	var closestDist = Mathf.Infinity;
	
	for (Target in targets)
	{
		var dist = (transform.position - Target.transform.position).sqrMagnitude;
		
		if(dist < closestDist)
		{
			closestDist = dist;
			closest = Target;
		}
	}
	//This for loop searches among the targets array for the game object which is closest. This object it sets equal to the "closest" variable.
	
	
	transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(closest.transform.position-transform.position), Turn * Time.deltaTime);
	//This function rotates the missile gradually (determined by "Turn" variable.
	
	transform.position = transform.forward * Speed * Time.deltaTime;
	//This moves the missile forward.
	
	
}

And here’s the homing script:

#pragma strict
var projectile : GameObject;

function Update () 
{
	if(Input.GetButtonDown ("Fire1"))
	{
		Instantiate(projectile, transform.position, transform.rotation);
	}
	//When the user presses the "fire1" button, the attached object, i.e. projectile, is instantiated.
}

Any ideas what could be wrong? Thanks.

Your homing script is broken. Look at this line:

transform.position = transform.forward * Speed * Time.deltaTime; //This moves the missile forward.

This will have the effect of scaling your forward direction and converting this into a position, which in practice will probably be very close to (0,0,0). I think you mean to use += to move your object forwards.