Emitter spawned in line trace against an object where it is not supposed to spawn

I made a line trace to destroy everything aside from statics + spawn an emitter. But when I shoot a static an emitter spawns in a default location on the map. What should I do? It seems to work with other objects.the emitter spawns normally aside from this.