Hello!
So I’m working on a game that requires a script to check to see if 2 players are in the game and then enables another script if there are 2 players and do nothing if there aren’t. I know there are Roblox games out there that use a system like this, but I just can’t seem to replicate it myself. Is there anyone that can lead me in the right direction to accomplish this?
1 Like
You could use a for
loop to get all the Players by doing game.Players:GetPlayers()
for number,player in pairs({game.Players:GetPlayers()}) do -- the Table inside the table is to check the number
-- here you can check the number of players by doing #player ot you can do #game.Players:GetPlayers()
end
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.