Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can you enable and disable a particle emitter in a loop script?

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.

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

2 comments

0

Thanks so much :)

0

Happy to help! =^)

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.