Particle effect as a muzzle flash

I’ve gotten particle effects working as a muzzle flash for my gun successfully. The only thing I am having trouble with is the fire like effect when moving the gun around. Everytime the gun moves, the muzzle flash has leaves a trail of fire like particles behind it, is there any way to stop it from doing this? Thanks in advance!

emitter.setInWorldSpace(false);

nvm, i got it by myself, thanks for the help anyways normen, im going to stop posting too much questions, :stuck_out_tongue: