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

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

Asked by 8 years ago

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

0
game.Players.NumPlayers Discern 1007 — 8y
0
Would I do game.Players.NumPlayers = 2 or someting like dat michaelbuck123 0 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago
if game.Players.NumPlayers < 2 then
    game.startergui.screengui.textlabel = "There is only " .. game.Players.NumPlayers .. " in the  server"
else
    --other code
end

Ad

Answer this question