ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 24 Dec 2012 03:38 PM |
a=Instance.new("Message") a.Parent = game.Workspace c = game.Players:GetChildren() for i=1,#c do if c[i][2] == nil then repeat wait(1) a.Text = "Need 2 players to start!" until c[i][2] ~= nil end end ------------------------------------------ I don't know how to check for 2 people, I just don't know..
c[i][2] doesn't work..
Any help? |
|
|
| Report Abuse |
|
|
Strieken
|
  |
| Joined: 17 Jun 2011 |
| Total Posts: 3058 |
|
|
| 24 Dec 2012 03:46 PM |
while true do wait(1) if game.Players.NumPlayers ~= 2 then Instance.new("Message",Workspace).Text = "Need 2 players to start!" elseif game.Players.NumPlayers >= 2 then Workspace.Message:Destroy() end end
:[Contact me if you'd like to schedule production of a model/script through Valhalla Tech. More info within my profile.]: |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2012 03:47 PM |
a=Instance.new("Message") a.Parent = game.Workspace c = game.Players:GetChildren() for i=1,#c do if c[i][2] == nil then repeat wait(1) else --Maybe this would work. I'm just a noob at scripting, so I might not do well. a.Text = "Need 2 players to start!" until c[i][2] ~= nil end end
|
|
|
| Report Abuse |
|
|
1pie23
|
  |
| Joined: 11 Jul 2010 |
| Total Posts: 1865 |
|
|
| 24 Dec 2012 03:49 PM |
| repeat wait() until #game.Players:GetPlayers() > 1 |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2012 03:53 PM |
local LivePlayers = game.Players.NumPlayers local GameRunning = false
game.Players.PlayerAdded:connect(function(player) LivePlayers = LivePlayers + 1 if GameRunning == false then checkPlayers() end end)
game.Players.PlayerRemoving:connect(function(player) LivePlayers = LivePlayers - 1 if GameRunning == false then checkPlayers() end end)
function checkPlayers() if game.Players.NumPlayers >= 2 then GameRunning = true --stuff end end |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2012 04:02 PM |
Here's a good one:
stop = Instance.new("Hint",workspace) stop.Text = "2 Players needed!" repeat wait(1) until game.Players.NumPlayers > 1 stop:Destroy() --Add stuff Here to do when There's 2+ Peoplez |
|
|
| Report Abuse |
|
|