Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Counting players in characters?

Asked by 10 years ago

If I wanted to wait until I had 2 players in the game how should I do that?

-GianniFlash

2 answers

Log in to vote
0
Answered by 10 years ago
if game.Players.NumPlayers > 2 then
    --do stuff
end
0
Do I need a connect line or a while wait? GianniKun 40 — 10y
0
It's >= not > Archonious2 160 — 10y
Ad
Log in to vote
0
Answered by 10 years ago
repeat wait(1/30) until game:GetService("Players").NumPlayers >= 2

Answer this question