OnClientEvent can't receive

Hey! I’ve been trying to send back information to all of the clients (except for the one who sent the information) via remotes (client → server → all of the other clients). It seems to be fired (from server) just fine (did a lot of checks with prints and stuff) but the local script (which is the same one that fired the same remote to server) can’t receive the remote.

Some other developers tried it and it worked perfectly (as it should) on their Studio, so I don’t know why it doesn’t on mine (no errors + everything is printed as it should + tested it out with 2 players + a lot of stuff).

Local script (which doesn’t seem to work):

remote.OnClientEvent:Connect(function(client,target)
	print("hey")
end)

Server script:

remote.OnServerEvent:Connect(function(plr)
	Activated()
	for i,v in pairs(game.Players:GetChildren()) do
		if v ~= plr then
			print(v)
			remote:FireClient(v,plr)
		end
	end
end)

Explorer (HScript is server script, LScript is local script, ActivateEvent is remote):
image

Thank you for reading, and I’d really appreciate your help since I’m going crazy about this!

Try game.Players:GetPlayers() instead of game.Players:GetChildren() :+1:

1 Like

Just tried it, and still doesn’t work.

Thank you for replying!

Oh I see, you’re probably connecting to the remote for only one player (the gear owner). If you want the event to replicate to all other players, they need to connect to the event too.
Probably better to use a global remote in ReplicatedStorage for that! :smiley:

1 Like