Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Help? How would I say a number of players in a server

I'm trying to create a script that will tell how many players are in the server like

if --What ever would show how many players are in the game Lets use game.players.numplayers = 2 do
--Bla bla here is the game script
else 
game.startergui.screengui.textlabel = "1 player is in your server game wont be starting until somone else joins
end

I know I wrote that wronge but what is the way to tell how many players are in a server

2 comments

0

game.Players.NumPlayers

0

Would I do game.Players.NumPlayers = 2 or someting like dat

1 answer

✓ Accepted answer
if game.Players.NumPlayers < 2 then
	game.startergui.screengui.textlabel = "There is only " .. game.Players.NumPlayers .. " in the  server"
else
	--other code
end

This discussion is preserved as it was. New answers, comments, and votes are closed.