I want to make it so when 2 players join a game, it will do something, then wait for another 2 players and also do something.
COMMUNITY QUESTION
How do I make it so I can count every two players added?
1 answer
you can use a while loop and the PlayerAdded event to do this
local Players = game:GetService("Players")
while true do
for i = 1, 2 do
Players.PlayerAdded:Wait() -- you can call :Wait() on an event to wait for it to fire
end
-- do something here
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Nevermind it only did it once and not again