Fireallclients not working for some reason in this situation

basically in my script im sending info from the client to the server then sending that info to every client, but when testing it it only seems to fire to the client that ran the events

--all variables are defined i just shortened it

--LOCAL SCRIPT

		RunService.RenderStepped:Connect(function(DeltaTime)
			remotes.SendPosition:FireServer(pos.X.Scale, pos.Y.Scale, newplayer:GetId())
		end)

remotes:WaitForChild("SendPosition").OnClientEvent:Connect(function(x, y, obj)
	local other = engine:GetBodyById(obj)
	if other then
		print(other:GetFrame().Name) --this only prints once, but its supposed to print for every player in the game (it gets the players name)
		if other:GetFrame().Name ~= plr.Name then
			other:SetPosition(x, y)
			end
		end
	wait(0.1)
end)
---------------------------

--SERVER SCRIPT


remotes:WaitForChild("SendPosition").OnServerEvent:Connect(function(plr, x, y, obj)
	remotes:WaitForChild("SendPosition"):FireAllClients(x, y, obj)
end)
---------------------------

all it does it instead of firing all clients it just sends to one, any help?

Is the remote the same instance for all clients? I recommend putting the remote in replicated storage to ensure it is the same instance as the documentation suggests.

Just like how a part created with the same propety is not equal to another part with the same properties since they are both unique objects or instances with a unique instance code. Only the connection to the same instance should get the signal from fire all clients.

all remotes are located in replicatedstorage and what do you mean by parts with same properties?

If its replicated storage the signal should be received.

Then the issue should be the jf statement to the print.

Have you tried printing the if statement condition?

i just realized whats wrong, basically the getbodybyid is different for each player because basically for each client it creates a body for all players, but each body has a separate id

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