Is there a way to send a RemoteEvent without Table just to two Players like: game.ReplicatedStorage:WaitForChild("RemoteEvent"):FireClient(player1 : player2, variables)
Not sure what you mean by without a table but you can fire one specific client. You just aren’t able to fire several clients in a single one liner if that makes sense
So this is valid:
event:FireClient(player1, a, b, c)
event:FireClient(player2, a, b, c)
You can also create a wrapper or function to handle firing specific clients in a manner like so:
local function fireClients(args: {any}, ...: Player) -- will unpack "args" and will fire to each client passed to the function
for i, player in ipairs({...}) do
event:FireClient(player, unpack(args)
end
end
-- then to fire multiple clients do:
fireClients({5, 10, 15, 20, workspace.Part, true}, player1, player2, player3)
Doing that will send each of the table’s members in order to each of the players specified after the table.
1 Like
Okay thanks
1 Like