Add a ParticleEmitter to Workspace with the particles already there

By “particles already there” I mean looking as if the ParticleEmitter was already sitting in Workspace for at least the Lifetime property. This can’t be solved by calling :Emit right after adding it because the overlapping particles need to be offset in time (phase) as well.

For example, I have this projectile model made from a ParticleEmitter with Lifetime=1 and Rate=16.


In order to look like this consistently, it requires 16 overlapping particles each offset by 1/16 seconds.

I want to be able to clone a copy of it into Workspace as soon as the player fires their gun, but it requires at least 1 second to have all 16 particles there overlapping at the right phases. The end result looks like this:

There’s currently no way to spawn the projectile coming out of the gun exactly as it looks in the first video since it needs to be in Workspace for at least one second. The only workarounds are to:

  1. Call Emit(Rate) which cannot exactly replicate how it’s supposed to look since particles need to overlap at different phases.
  2. Keep a cache of projectiles somewhere in Workspace, which can be wildly inefficient since all those particles need to be kept in memory.

Some solutions could be to:

  1. Add a “phase” argument to Emit. Then we could solve this problem by calling Emit(1, i) for i=0, 1, 1/16 as soon as the ParticleEmitter spawns.
  2. Add a property, i.e. “SpawnWithParticles” to ParticleEmitter for this specific case if it’s common enough.

(Happy to work on this with a staff member if they’re open and able to share the relevant code)

4 Likes

Why not just set the rate to 200 and after 16/200 seconds set it to 16? It would look almost seamless then?

The 16 particles spawned in that time between t=0 and t=16/200 would be offset in phase by 1/200 seconds, not 1/16 seconds. They would look squished together the same way calling Emit(16) right after it spawns would. The only way to get 16 particles offset by 1/16 seconds each is by having the ParticleEmitter somewhere in Workspace for at least 1 second.

Support - although I think the best solution would be to add a TimeSkip (number value) property which would sit nicely under TimeScale. I imagine this could be achieved pretty simply considering particles are not really dynamic.