Particles not in sync with all clients

Hello! So recently I started testing different particle effects using the :Emit() command to see how they’d look like and such. The issue is that the particles are not in sync with all clients, if a certain client isn’t looking where the particles are and then the Emit() command is used on the particles, the particles won’t show up in said client’s screen until they look at the direction where the particles are, and most of the times it looks off.

I’ve tried calling the Clear() function before using the Emit() function but it still has similar results, the only solution I’ve come with is to use a wait command after calling the Emit() function and then clear everything, but the particles suddenly disappearing doesn’t look too good and I’d like to know if there’s any other ways to fix the issue. I’ve tried looking at the dev hub and in the forum for the past few days as well but I didn’t find anything related to my problem yet.

This question might be silly and have a simple answer as I’m new when it comes to learning about particles and such but I really tried everything I could to fix the issue. If this post should not be in this section please let me know and I will change it.

Here is the code of the block that does the effect thingy: (It’s a server script inside the green block)

local block= script.Parent
local att= block:WaitForChild('att')
local cd, db= 1, false

block.Touched:Connect(function()
	if db== false then
		db= true
		block.Color= Color3.fromRGB(255,0,0)
		
		att.bd:Clear()
		att.bd2:Clear()
		
		att.bd:Emit(50)
		att.bd2:Emit(30)
		
		wait(cd)
		db= false
		
		block.Color= Color3.fromRGB(0,255,0)
	end
end)

Here’s a video showing the problem:

1 Like

Why not define them normally?

local cd = 1
local db = false

Also,

Use task.wait(cd) instead.

I think this has something to do with client behavior - the delay or whatever you want to call it. Your code looks fine to me.
Also, remember that Touched event is a local event. [It indeed does stuff on the server , but it is still local]. Try this and tell me if anything has changed :

local block= script.Parent
local att= block:WaitForChild('att')
local cd = 1
local db = false

block.Touched:Connect(function(Object)
    if not game:GetService("Players"):FindFirstChild(Object.Parent.Name) then return end
	if db== false then
		db= true
		block.Color= Color3.fromRGB(255,0,0)
		
		att.bd:Clear()
		att.bd2:Clear()
		
		att.bd:Emit(50)
		att.bd2:Emit(30)
		
		task.wait(cd)
		db= false
		
		block.Color= Color3.fromRGB(0,255,0)
	end
end)

Thanks for the help, I’ve tried your code and it sadly caused the same result.

In case of the Touched function being the thing that causes that weird behaviour, what would you recommend to achieve a similar result?

1 Like

I’ve checked out the bug reports section and have found that someone reported it as bug back in 2018, in a post related to that one (from 2016) a roblox staff said that said behaviour is intentional, particles do not render if they’re off screen to get a performance boost or something related, even though calling the emit function several times will end up loading way more particles at once when looking at the particle emitter than constantly rendering a few off screen, or at least that’s what I think. I’m guessing that it is not worth it to keep trying to find a way around this if it’s something that is supposed to happen. I’ll mark this as the solution even though my problem is still there.

1 Like