I wanted to have a winter breathing effect and I was wondering if you could enable and disable the particle effect in a loop, to activate every like 15 seconds or something.
✓ ANSWER ACCEPTED
Can you enable and disable a particle emitter in a loop script?
2 answers
✓ Accepted answer
If you want to do it in a loop ~
repeat -- This is what triggers the loop
script.Parent.Enabled = false -- The particle is off
wait (15) -- This is how long you have to wait, change the number if you want to make it longer/shorter
script.Parent.Enabled = true -- Particle ends on a true variable therefore it will continue to loop
until false -- The loop won't end until the particle ends on a false variable
if the particle is in a model ~
repeat
script.Parent.Parent.ParticleEmitter.Enabled = false
wait(15)
script.Parent.Parent.ParticleEmitter.Enabled = true
until false
There is a property in the Particle etmitter called "Enabled"
you can use it like this.
script.Parent.Enabled = false -- particles dont emit
wait(3)
script.Parent.Enabled = true -- WOAH THEY START ETMITTING
i hope this helps you.
1 comment
0
I never thought it was that simple.... I am amazed XD
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thanks so much :)
Happy to help! =^)