|
| 10 Sep 2013 06:18 PM |
It pretty much doesnt go after if db == true and game.Players.NumPlayers >2 then :( ----------------------------------------------------------------------------------------------------------
tex = ""
function TextChange() for i,v in pairs(game.Players:GetChildren())do v.PlayerGui.ScreenGui.GuiBanner.Text = tex --Change Text end end function tele() for i,v in pairs(game.Players:GetChildren())do v.Character.Torso.CFrame = CFrame.new(-80, 17.4, -123)--Teleports everyone to map end end
db = true if db == true and game.Players.NumPlayers >= 2 then --Debounce and plyrs equal to or bigger than 2 db = false tex = "The game will start in: 3"--Gui msg TextChange() wait(1) tex = "The game will start in: 2" TextChange() wait(1) tex = "The game will start in: 1" TextChange() wait(1) tex = "Run!" TextChange() tele() wait(3) tex = "" TextChange() db = true end
|
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 10 Sep 2013 06:21 PM |
NumPlayers = game.Players:GetChildren() if db == true and #NumPlayers >= 2 |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 06:33 PM |
| Still doesnt work, but all I know is that it doesnt make it past the first if statement |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 06:34 PM |
| But thanks for helping! =D |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 10 Sep 2013 06:37 PM |
| If you are alone then it isn't going to continue. Since it doesn't repeat, when the server starts, one person is in it, the script does nothing about it and the program is done. |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 06:44 PM |
| No, I start a server(f7) and then I add players (alt+f7) |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 10 Sep 2013 06:47 PM |
NumPlayers = game.Players:GetPlayers() while db == true and #NumPlayers >= 2 do -- This is somewhat what he means. db = false tex = "The game will start in: 3"--Gui msg TextChange() wait(1) tex = "The game will start in: 2" TextChange() wait(1) tex = "The game will start in: 1" TextChange() wait(1) tex = "Run!" TextChange() tele() wait(3) tex = "" TextChange() db = true break end
|
|
|
| Report Abuse |
|
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Sep 2013 06:59 PM |
Why don't you just:
repeat wait(0) until Game.Players.NumPlayers >= 2 --code |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 07:00 PM |
The reason I put a debounce is so it doesnt start again when it already did. This is what I have:
tex = "" db = true
function TextChange() for i,v in pairs(game.Players:GetChildren())do v.PlayerGui.ScreenGui.GuiBanner.Text = tex --Change Text end end function tele() for i,v in pairs(game.Players:GetChildren())do v.Character.Torso.CFrame = CFrame.new(-80, 17.4, -123)--Teleports everyone to map end end
NumPlayers = game.Players:GetPlayers() while db == true and #NumPlayers >= 2 do -- This is somewhat what he means. db = false tex = "The game will start in: 3"--Gui msg TextChange() wait(1) tex = "The game will start in: 2" TextChange() wait(1) tex = "The game will start in: 1" TextChange() wait(1) tex = "Run!" TextChange() tele() wait(3) tex = "" TextChange() db = true break end |
|
|
| Report Abuse |
|
|
| |
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 10 Sep 2013 07:06 PM |
you told the loop to break on the first cycle. this is the second time I've seen someone do this within the past day. |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 07:07 PM |
| So I get rid of the break? |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 07:09 PM |
| I tried breaking it, still doesnt work. I just know the problem is somwhere from the top to the first if statement |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 07:10 PM |
for i = 3,1,-1 do TextChange('The game will start in: '..i) wait(1) end wait(3) TextChange('') |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 07:11 PM |
| Changed TextChange() to TextChange(tex) |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 07:14 PM |
Still doesnt work D= error is somwhere from top to first if statement. The print thing told me that
|
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 07:15 PM |
| Wait...I accidentally remove print...lemme try |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 07:16 PM |
| By the way, The Players service has NumPlayers as a property. You don't need #game.Players:GetPlayers() to do it. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Sep 2013 07:16 PM |
| Stop using free model scripts and learn yourself |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 07:17 PM |
| ? Its not a free model. There was a print originally, then another guy gave me a script, then I replaced my script with that, and the print got removed. Oh, and is it because there are comments? I put them in. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Sep 2013 07:18 PM |
| You shouldn't be trying to edit this if you don't know that print has no affect. |
|
|
| Report Abuse |
|
|
| |
|
redlo43
|
  |
| Joined: 16 Feb 2011 |
| Total Posts: 4722 |
|
|
| 10 Sep 2013 07:19 PM |
You don't really need prints for leaderboards... Unless you really need organization
|
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 07:19 PM |
Yes it does, there is a gui model roblox made so you can see print...oh and f7 alt+7 and alt+f7
The window f7 opens up is a server, and there is an output. |
|
|
| Report Abuse |
|
|