After the last few hours I’ve been getting really fed up with Studio,
I am trying to make a matchmaking system and everything works except from the last step, the last step is to Fire an event with data to both of the chosen players, however when I FireClient it only works for 1 player!
My script:
for i, v in pairs(game.Players:GetChildren()) do
if v.UserId == userId then
remotes.sendMatch:FireClient(v, {data})
elseif v.UserId == randomMatch then
remotes.sendMatch:FireClient(v, {data})
end
end
end
it should be just giving sending 2 events to 2 different players(also randomMatch is the just a UserId)
You could simplify this by using :GetPlayerFromUserId() GetPlayerByUserId Api
if that dosen’t work, have you verified that RandonMatch is a userid, and that its a number and not a string?