Particles do not emit in a newly generated part

Hi

I’m making a system in a game which uses this same setup in an extremely different way, which is why I’ve set the demo script up like this. It has to be on the server, I cannot create/emit them on the client, so keep that in mind!

Basically, if I were to parent the particles to the “RootAttachment” inside the pre-existing HumanoidRootPart, the particles would appear with no issues. This however, is also not viable for game I am making & I must use a part for a majority of the VFX, due to them having many different particles.

The script below should parent the part holding the particle to workspace, and then promptly emit the particle.

The only solution I’ve had is to include a wait() before emitting the particles however that is unsatisfactory for me as I’d like a less hacky, more logical solution! If you have no solution, but have an explaination as to why this is happening, let me know as well! Thanks.

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(Player)
	local Character = Player.Character or Player.CharacterAdded:Wait()
	
	Player.Chatted:Connect(function()
		local ParticlePart = script.ParticlePart:Clone()
		local Particle = ParticlePart.Attachment.ChattedParticle
		
		ParticlePart.Parent = workspace
		print("Part is parented to workspace")
		
		ParticlePart:PivotTo(Character:GetPivot())
		
		print("Attempting to emit particle")
		Particle:Emit(20)
		print("Successfully emitted particle")
		
		-- Cleanup after the particle has fully played
		task.delay(Particle.Lifetime.Max, function()
			ParticlePart:Destroy()
		end)
	end)
end)

image

2 Likes

ChattedParticle.Enable = true … maybe

1 Like

For :Emit() to work, the particle has to be diabled.

1 Like

I believe it is because your particle is in an Attachment. Usually ParticleEmitters only work through parts. Not sure though.

2 Likes

Particles work when in attachments, the reason I am using an attachment is so I have a single point where particles spawn within the part, instead of spawning anywhere inside of the parts volume

1 Like