ParticleNot Emitting

This is the strangest thing ever. So, I have a function set up that emit the particle.

local function effect(hit)
	task.spawn(function()
		for i,v in pairs(hit.Attachment:GetChildren()) do
			if v:IsA("ParticleEmitter") then
				v:Emit(1)
				print(v)
			end
		end
	end)
end

Everything works in my other game, but this just doesn’t emit. It a server script and it even print. It works when I enable it but not emits. It the same script I used as my other game. I made sure it positioned right too.
image
Please help me with this.

What does your output look like? Is it printing v? You can also try increasing the emit count

Yes I said it printing. The emit size isn’t the problem because I had it the same in my other games and it works perfectly fine. If you can, try replicate and let me know results it be appreciated.

Can you send the particle as a rbxm?

I can’t right now but it just one of those fancy particle under an attachment. There’s like around 10 but it should all emit.

The “hit” btw is just a block that has the attachment, pretty self explanatory.

I’ve had the same problem, and you can simply call the waiting function up there

local function effect(hit)
	task.spawn(function()
                task.wait(0.01)
		for i,v in pairs(hit.Attachment:GetChildren()) do
			if v:IsA("ParticleEmitter") then
				v:Emit(1)
				print(v)
			end
		end
	end)
end
1 Like

Is your ParticleEmitter’s shape a sphere or a cylinder? If so then it won’t work when parented to an attachment.

1 Like

yea parictles emit function suck try this:

local function effect(hit)
	task.spawn(function()
		for i,v in pairs(hit.Attachment:GetChildren()) do
			if v:IsA("ParticleEmitter") then
wait(.1)
				v:Emit(1)
				print(v)
			end
		end
	end)
end
1 Like

Thanks this worked! What should I do for the future to prevent something like this?

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