Problems with client side ran vfx

I was hired to make a client side ran anime-like vfx. It is a kamehameha style.

The issue is that Only the part when it charges, the energy sphere (In the player’s left hand) can be seen by all players. The beam itself can only be seen by the player who fired it, but can sometimes be seen by other players as well.

robloxapp-20210621-1622145.wmv (2.1 MB)

The function is called by an event, so i tried checking if it uses FireAllClients(), and it does. I haven’t tried anything else yet, because I have no idea what it can be, or how can I fix it.

This is the code of the Global script, the one that fires the remote to all clients.

local ReplicaedStorage = game:GetService('ReplicatedStorage')
local debounce = {}
local globalDebouncer = false

for _, Remote in pairs(ReplicaedStorage.MovesRemotes:GetChildren()) do
	Remote.OnServerEvent:Connect(function(player, active)
		if not globalDebouncer then
			globalDebouncer = true
			if active and Remote.Name == "Kamehameha" then
				Remote:FireAllClients(player,active)
				if table.find(debounce, player.Name) then 
					table.remove(debounce,table.find(debounce,player.Name)) 
				end
				globalDebouncer = false
				return
			end
			if table.find(debounce, player.Name) then
				table.remove(debounce,table.find(debounce,player.Name))
			else
				table.insert(debounce, player.Name)
				Remote:FireAllClients(player,active)
			end
			globalDebouncer = false
		end
	end)
end

I hope you can help me, because I have no idea what to do here. If there is anything else you might need, please ask.

1 Like

It might be because not all clients have the local script. Therefore they’re not receiving the FireAllClient event. I hope this helps.

I have managed to find a more specific cause of the problem. Is there any reason why a workspace:WaitForChild(Folder) won’t find any, when it exists? Weird thing is that it doesnt even print “Infinite yields possible…”. (Folder is a variable name, a child of Workspace) If it means anything, it waits for the child inside of the local script.