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

How Can I Manually "Emit" A Particle?

I would like this because I use particleemitters to run my muzzle flares. However, I enabled the emitter for one second and turn it off and hope for the best results. Is there a way to make the particle emit everytime the gun is fired?

I will make it so it emits every 1-5 seconds, in my inefficient way -

local pe = workspace.Part.ParticleEmitter

while wait(math.random(1, 5)) do
	pe.Enabled = true
		wait(0.5)
	pe.Enabled = false
end

TL;DR - Any efficienter way to manually emit particles?

2 comments

0

:Emit

0

Learn to use documentation like the Wiki! http://wiki.roblox.com/index.php?title=&search=+emit+&button=

1 answer

You can set the rate at which particles emit using the rate property of the particle emitter.

local pe = workspace.Part.ParticleEmitter
pe.Rate = math.random(1, 5)

To manually emit a particle:

local pe = workspace.Part.ParticleEmitter
pe:Emit(1) -- 1 represents the amount of particles to emit

If this answer helped you, please upvote and or accept it.

2 comments

1

Isn't there an :Emit method?

0

Sorry, I was wrong. Anyways, it still makes more sense to set the rate of the emitter rather than to manually emit the particles.

This discussion is preserved as it was. New answers, comments, and votes are closed.