Problem with object's rotation

Hello I have a small problem and already looked at other threads with no luck. I have a ship that by pressing the space bar it shoots a missile from a spawn point(empty object) that i have created in front on the ships nose. Now my problem is when the ship is rotated and i fire a missile the missile’s nose wont look where it is supposed to look. For instance i might shoot and the missile’s front direction is the back of the missile and not the nose. With a few words the missile will always look at certain direction no matter where the ship is looking at.

I have set the object to local space already.
Any suggestions? Thanks

The script that is attached to the boat :

var bulletPrefab:Transform;
var speed = 2000;

function Update () {

if(Input.GetButtonDown(“Jump”))
{
var bullet = Instantiate(bulletPrefab, transform.Find(“SpawnPoint”).transform.position,
Quaternion.identity);

bullet.tag =“vehicleProjectile”;

bullet.rigidbody.AddForce(transform.forward * speed);

}

}

var bulletPrefab : Transform;
var speed = 2000;
// -------------------------------------------------------------
var spawnPoint : Transform; // Don’t use Find(). It’s slow. :slight_smile:
// Just set this variable in the inspector
// like you did with bulletPrefab.
// -------------------------------------------------------------

function Update () {

    if(Input.GetButtonDown("Jump")) {
        var bullet = Instantiate(bulletPrefab, 
                                 spawnpoint.transform.position, 
// -------------------------------------------------------------
                                 spawnpoint.transform.rotation);
// ----------------------------- OR ----------------------------
                                 Quaternion.LookRotation(transform.forward));
// -------------------------------------------------------------

        bullet.tag ="vehicleProjectile";

        bullet.rigidbody.AddForce(transform.forward * speed);
    }
}

Meh it was that simple -.- Thanks a lot for the solutions and the tip(: