Particles don't load instantly and stop working after a bit of studio use

Edit: The below is about the bug report before I figured it out. You can still read to find out how I reproduced it but the proper report is at the bottom

Here’s the code and below is the workspace. No matter what I do I can’t get the particles to work anymore. Before to get them working I had to add the delay() or a wait() in order for the particles to show. Today/Yesterday the particles just stopped working. You can see I tried fiddling a bit with different waits and attempts to get them to work but it simply won’t. I even see the Impact part in workspace as well as the particles inside the part, but they still won’t emit.

local function Mark(p, Ignore, Color)
	local P = script.Impact:clone()
	local SD, S = P.ParticlesDust, P.Particles
	P.Anchored, P.CanCollide, P.Size, P.Transparency = true, false, Vector3.new(0.4,0.4,0.4), 1
	P.Parent, P.CFrame = Ignore, p*CFrameN(0,-0.199,0)
	SD.Color = ColorSequence.new(Color)
	delay(0, function()
		wait(1)
		P.Particles:Emit(35)
		SD:Emit(4)
		game:GetService("Debris"):AddItem(P, 12)
	end)
end

blob.png

Edit: Restarted studio. It works fine. Still a bug I guess. The other issue is that I have to put in that delay or it won’t emit the particles. If I emit in the same frame that I parent it won’t work.

2 Likes

Check your graphics level and make sure it’s not at 1 or another low value. IIRC with lower graphics levels you get 1/(11-currentLevel) particles from Emit, so if you’re at quality level one you’d be getting 3.5 (3 or 4) from Particles and 0.4 (0 or 1) from ParticlesDust which might make them really hard to notice.

2 Likes

If it’s still a bug shouldn’t it be a bug report?

2 Likes

Yeah. I’ll edit OP and state the other half of the problem.

2 Likes

Could you upload the repro place somewhere? I’d like to take a look.

1 Like

It’s as simple as running a function that parents a part with an emitter into workspace then trying to Emit() it instantly.

It won’t work unless you wait a frame or two.

1 Like

Got it, I now know what’s happening. Thanks!

2 Likes

Awesome. Can you fix it easily? It’s making my impact particles look kinda weird because I wait a full frame between impact and particles.

1 Like

No time for now (busy with other projects), but I’m putting down all of these bugs to our Jira, so they aren’t forgotten.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.