Are I can create the condition to check the count players?

I think that:

 local Players = game.Players:GetPlayers()
 if Players.len() >= 2 then
     -- code
 end

or

for i, v in pairs(game.Players:GetPlayers()) do
    if v.len() >= 2 then
        -- code
    end
end
 local Players = game.Players:GetPlayers()
 if #Players >= 2 then
     -- code
 end

Just a future note for you since I didn’t mention, # is used to get the amount of items in a table/length of table, and since GetPlayers() gets the players in game.Players, it’s a table so # can be used

1 Like