Particles not emitting

Hello, I’ve recently come across a strange issue.

After I noticed that particles aren’t centered while emitting (I was directly adding the emitters to the Player Torso), I opted to use an attachment instead.

Strange thing is that, the particles just refuse to appear. The sound that plays in this script does work, however.

Anybody could give any advice?

	local particle2 = game.ReplicatedStorage.WepPar:FindFirstChild(par)
	local partchild = particle2:GetChildren()
	
	
	
	local attachment = Instance.new("Attachment", data.Torso)
	
	
	for i = 1, #partchild do
		local clone = partchild[i]:Clone()
		clone.Parent = attachment
		local emitime = clone:GetAttribute("emit")
		clone:Emit(emitime)
		if clone:FindFirstChild("Sound") then
			clone.Sound:Play(1)
		end
	end

Is the Emitter enabled or not? If not, you would need to enable it like this (template emitters are usually disabled):

clone.Enabled = true

Let me know if this solves your problem or not.

Hope this helps,
Fizzitix

1 Like

didn’t seem to work, sadly.

Strangely, it works when the particles were directly applied to the torso, but not if it is an attachment - though, that just made the particle effects appear off center lol

I think particle emitters require a surface area to emit from, so a point attachment wouldn’t have this.
You could try amending the z-offset, emission direction etc of the emitter to fix the positioning.

That’s odd, it specifically states in the documentation that you can parent Emitters to Attachments:

Maybe add an Offset attribute to each emitter and define the offset there instead of using attachments?

Would that work for a player? I’ve had 2 iterations of this code already;

  • One created an invisiblle part at the player to produce the particle, then is destroyed. This, however, made the particle “Linger Behind” - aka it didn’t follow the player

  • The next one was the aforementioned attaching to torso

Does Offset work for moving objects? This is from ServerScriptService, FYI. Sorry if im asking a little too much here

That’s the really weird thing; The only way that would be possible is if the part itself was very small - which, in case of a humanoid torso, isn’t. The Official Documentation itself recommended the use of Attachments to rectify this issue. I’m pretty sure this wasn’t actually possible a few years ago, but was added after popular request.

You are completely right (lesson to self: check docs properly!).

The only thing I can think of then is that the attachment isn’t parenting to the part as expected.
Instead of: local attachment = Instance.new("Attachment", data.Torso)
Try:

local attachment = Instance.new("Attachment")
attachment.Parent = data.Torso

Instance | Roblox Creator Documentation
You could also try printing the attachments CFrame to make sure where it is.
Also a render stepped wait to ensure it is there before emitting.
Hope this helps.

Unfortunately, this was already tried; In Workspace, if you hovered over the player model, and selected the torso, you would be able to see the attachment on it (By extension, the emitters). It’s why the sound played works

I recommend using HumanoidRootPart as oppose to Torso, as it works for both r15 and r6.

yeah, ty for reminding me lol

The issue still persists, however.

The Actual full code is here; Hopefully someone could figure something out.

How it works is that another script would fire the event to this script (Particles when you hit the enemy, get hit etc), which finds the particles in ReplicatedStorage and places them in the target - either you or the hit target.

remote.Event:Connect(function(data, par)
	
	local particle2 = game.ReplicatedStorage.WepPar:FindFirstChild(par)
	local partchild = particle2:GetChildren()
	
	
	
	local attachment = Instance.new("Attachment", data.HumanoidRootPart)
	
	
	for i = 1, #partchild do
		local clone = partchild[i]:Clone()
		clone.Parent = attachment
		local emitime = clone:GetAttribute("emit")
		clone:Emit(emitime)
		clone.Enabled = true
		if clone:FindFirstChild("Sound") then
			clone.Sound:Play(1)
		end
	end
	
	task.wait(1)
	local torsolist = data.HumanoidRootPart:GetChildren()
	for i = 1,#torsolist do
		if torsolist[i].Name == "Attachment" then
			torsolist[i]:Destroy()
		end
	end
	
end)


Issue solved lol.

I solved it, but I’m genuinely curious why that was the solution. It was to turn the emitter shape from a sphere to a box… that was kinda it.

Still have 0 idea why thats the case lol, but ty to those that tried to help

3 Likes


This is as much as the official docs can explain why.

1 Like

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