I want to make a function that disables the particles inside of a part without deleting the particle emitter. …enabled = false only stops the part from creating new particles. I want to delete the ones that have been created already. How do I do this?
You can try to parent the emitter to nil, and then later, when you want to re-enable it, you can just set the parent of the emitter back to the part.
Solution
Set ParticleEmitter.Size
to 0.
Explanation
When disabling a ParticleEmitter, it won’t remove already created particles, as seen above. You already knew this but still it was worth to show what you’re talking about.
If you don’t want to delete the particle emitter, I’m assuming @PiAndInfinite’s solution of setting its parent to nil wouldn’t be ideal either.
Which leads to two ideas left on how to achieve the solution, which are Size or Transparency. I suggested two ways of doing so because you might already be utilizing one of the properties.
When you want to disable particles, for an additional (possible, not sure) performance boost, I suggest doing ParticleEmitter.Enabled = false
and then ParticleEmitter.Size = 0
.
Doing so will recreate exactly what you’re looking for without removing the ParticleEmitter:
Solved my problem. Thank you so much!