Fire a event to specific table

  1. What do you want to achieve?
    I want to make a event fire only for players that are in a specific table .
  2. What is the issue?
    I don’t quite know how to fire a event only for players in table , I also can’t find any of these problem in devForum .

You can use the player’s UserId, this example will check if your UserId is inside that table when joining

local List = {}
game:GetService("Players").PlayerAdded:Connect(function(Player)
	if table.find(List, Player.UserId) then
		-- Code
	else
		-- Another code
	end
end)

what I mean is the players that’s in the table , not just the specific player .

for i, player in pairs(playersTable) do
    event:FireClient(player)
end
1 Like