Particle emitters under cloned parts don't emit for client

I’m currently making a particle effect for an RPG type boss fighting game.

The problem here is in the script, where attacks are cloned and put into the boss arena. For one of the attacks, I wanted a particle effect when the gemstone hits the ground. But the particle effects can’t seem to load/show on the client? The thing that confuses me is that when I switched to server mode, the particles show up just fine.

Here’s a video:

Here’s the script:

local boss = game.Workspace.Mobs.TheArmoredGiant

local function Attack()
	
	for i = 1, 10 do
		
		for i,player in pairs(game.Players:GetPlayers()) do
			if player.Character then
				
				local att = game.ReplicatedStorage.BossAttacks["TAG Attack 1"]:Clone()
				local targ = game.ReplicatedStorage.BossAttacks["TAG Attack 1 Target"]:Clone()
				
				targ.Parent = game.Workspace.SpawnedBossAttacks.TheArmoredGiant
				targ.CFrame = CFrame.new(math.random(78,114), 73, math.random(-0.5,46)) * CFrame.Angles(0, math.rad(105), 0)
				
				att.Parent = game.Workspace.SpawnedBossAttacks.TheArmoredGiant
				att.CFrame = targ.CFrame + Vector3.new(0, 60, 0)
				
				for v = 1, 24 do
					att.CFrame -= Vector3.new(0, 2.5, 0)
					wait()
				end
				
				local eff = game.ReplicatedStorage.BossAttacks["TAG Attack 1 Effect"]:Clone()
				
				eff.Parent = game.Workspace.SpawnedBossAttacks.TheArmoredGiant
				eff.CFrame = targ.CFrame + Vector3.new(0, 0.4, 0)
				eff.Rotation = Vector3.new(90, 0, 0)
				
				eff.Smoke:Emit(60)
				
				targ:Destroy()
				att:Destroy()
				
				task.wait(1)
				
				eff:Destroy()
				
			end
		end
		task.wait(0.5)
	end
end

while task.wait(8) do
	
	for i = 1, 3 do
		task.spawn(Attack)
		wait(0.5)
	end
	
end
1 Like

Have you tried debugging this to see if anything is interfering with the particle emission on the client side?
Look to see if the particles exist on the client using the explorer.

1 Like

The particle emitters show up on both client and server modes, there aren’t any errors in the output and everything in the script goes through when I test it with print().

Server mode:
image

Client mode:
image

(They aren’t the same image)

Uhhh… May I ask, can you emit the particles on the client, not the server. and see if they are emitting?
Also, there just might be a problem with the fact that you emit the particle too fast, when it is not even loaded on the client as an object, replication needs time.

This is my first time working with particle emitters, so I don’t really know what you mean by emitting the particles on the client, sorry.

How about you add a single wait() before eff.Smoke:Emit(60) line in your function? If that doesn’t do anything, try the :point_down: debug solution.

Make a button and put a LocalScript in it. Put inside the LocalScript this:

script.Parent.MouseButton1Click:Connect(function()
    for _, AttackPart in pairs(worspace:WaitForChild("SpawnedBossAttacks"):WaitForChild("TheArmoredGiant"):GetChildren()) end
        local FoundEmitter = AttackPart:FindFirstChildOfClass("ParticleEmitter")
        if FoundEmitter then
            FoundEmitter:Emit(10)
        end
    end
end)

Then, when the attack spawns press the button. Particles should appear. If they don’t, than there is a problem with the particles I think…

2 Likes

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