Row Instantiates in World space not Local space

I’m instantiating a spaced row of bullets in front of a game object (rwf royal welsh fusilers). This works fine when the object is stationary, however when the object rotates the bullets instantiate on the world x axis not the local x axis of the game object. The y and z axis are fine. I’ve tried many variation on “transform.localRotation” and making the game objects rotation a variable to no avail. The question is- how to get the x axis of the row as it instantiates to match the x axis of the game object? I’m sure the answer is something simple that I’ve overlooked. Any Suggestions?
Thanks

var bullets : Rigidbody;
var sbt : float = .5;
var rwf : GameObject;


function Update ()
 {
  
 
 if(Input.GetKeyDown(KeyCode.Return)){
 var pos : Vector3 = rwf.transform.position;
 var i : int = 0;
  for(i=0; i<=8; i++){

 Instantiate(bullets, Vector3(pos.x+i-4*sbt, pos.y, pos.z-2), rwf.transform.rotation);

}
}
}

I can see here that you are taking a position in the world space.

var pos : Vector3 = rwf.transform.position;

Instead of this just take a local position.

var pos : Vector3 = rwf.transform.localPosition;

And then I believe that something like this should be done.

GameObject yourBullets = (GameObject) Instantiate(bullets);
yourBullets.transform.parent = rwf.transform;
yourBullets.transform.localPosition = Vector3(pos.x+i-4*sbt, pos.y, pos.z-2);
yourBullets.transform.localRotation = rwf.transform.rotation;

Try it and let me know whether it works for you.