Muzzle flash doesnt stay at its parent when i shoot

FIXED IT

Go to Inspector, choose Ellipsoid Particale Emitter, uncheck “Simulate In World Space”

Hey, so im having this problem that if i shoot, i go threw my muzzle flash. Im using particles, here’s the little script that i wrote:

using UnityEngine;
using System.Collections;

public class Shootings : MonoBehaviour {

public Transform bulletPrefab;
public Transform Spawn;
public bool ImFacingLeft;
public Transform muzzelFlash;

void Start ()
{
}

void Update ()
{

if (Input.GetButtonDown(“Fire1”))

{

Transform muzzle = Instantiate(muzzelFlash, Spawn.position, Spawn.transform.rotation) as Transform;

muzzle.transform.parent = Spawn;

}

if(Input.GetKeyDown(KeyCode.A))
{
ImFacingLeft = true;
}

if(Input.GetKeyDown(KeyCode.D))
{
ImFacingLeft = false;
}
if (Input.GetButtonDown(“Fire1”))
{
FireBullet();
}

}

void FireBullet(){

//Clone of the bullet
GameObject Clone;

Clone = Instantiate(bulletPrefab, Spawn.position,Spawn.transform.rotation) as GameObject;

if(ImFacingLeft == false)
{
Clone.rigidbody2D.AddForce(Vector2.right * 50);
}

if(ImFacingLeft == true)
{
Clone.rigidbody2D.AddForce(Vector2.right * -50); }
}
}

was there really a need to create a new thread for this… would it not have made more sense to add this as a reply to the thread you made earlier so the problem and the resolution is all in one place??

http://forum.unity3d.com/threads/246171-Making-particles-stay-at-its-parent-(MuzzelFlash)