How can i emit particles properly?

  1. i want to achieve good explosive particles

  2. When I emit my particles in a plugin, they look good, but when I emit them in code, they look awful.
    This is in the plugin:


    This is the outcome with my script:
    image

  3. I tried multiple particle emitter scripts but they dont work for me
    Heres my current script:
    image

2 Likes

there should be other attributes under the particle called “EmitDelay” and “EmitDuration”.
image

Using all these attributes together should get the result you desire. This is what I do:

for _, Particles in yourEffect:GetDescendants() do
	if Particles:IsA("ParticleEmitter") then
		task.delay(Particles:GetAttribute("EmitDelay") or 0, function()
			Particles:Emit(Particles:GetAttribute("EmitCount") or Particles.Rate)
		end)
	end
end

I only use EmitCount and EmitDelay so your code might look different if you want to incorporate EmitDuration.

1 Like

So i used your code and it still doesnt work:
image

For Reference:
With the plugin:

I mean this button with plugin:
image

1 Like

could you screenshot what attributes are under your particles?

1 Like

ofc


1 Like

The plugin seems to just be emitting a different amount of particles from whats set in the attribute.
image
Try changing EmitCount and EmitDelay to whatever it is in the plugin

1 Like

like this?

1 Like

yeah, let me know if that works

1 Like

Nah it doesnt work…

1 Like

you set it for all your particles?

1 Like

Yes the settings are correct. It should work but it doesnt

1 Like

weird, hard to tell from just screenshots. Maybe your graphics quality is set to low?

1 Like

no they are set to max level. Should i download a different plugin or smth?

Heres how i implement the funtion you gave me:
image

Do u have any other advice? Bro

if you dont mind sending over a place file, i could take a look at it

yeah i can do that give me one sec i dont know how to do this

Theres a update missing in my studio.

The problem here is that you’re emitting the particles as soon as its cloned, which doesn’t give them a chance to load.

There are definitely better ways to do this but a quick fix would just be to put a task.wait(.1) before emitting the particles:

local function EmitAll(yourEffect)
	task.wait(.1)
	for _, Particles in yourEffect:GetDescendants() do
		if Particles:IsA("ParticleEmitter") then
			task.delay(Particles:GetAttribute("EmitDelay") or 0, function()
				Particles:Emit(Particles:GetAttribute("EmitCount") or Particles.Rate)
			end)
		end
	end
end

One solution might be to create the part earlier, then just do Emit() whenever the button is pressed instead of cloning it.

3 Likes

Thank you so much. This looks so much better now. Can u give me any other tipps to my scripts or explain to me how i could load a particle so that i can emit it later?