llcoolj03
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 6135 |
|
|
| 14 Aug 2015 02:40 PM |
for i = 120, 0, -1 do if gamePlayers.Value == 1 then for i,v in ipairs(game.Players:GetPlayers()) do a = v.PlayerGui.Main.HUD.Alive if a == true then MainGUI.Text = v.Name.." has won the round!" end end else wait(1) MainGUI.Text = "Time Remaining: "..i end end
no output
The TextButton(MainGUI) is not changing text, and it just restarts the whole script. |
|
|
| Report Abuse |
|
|
llcoolj03
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 6135 |
|
| |
|
llcoolj03
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 6135 |
|
| |
|
Scout9
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 255 |
|
|
| 14 Aug 2015 02:51 PM |
if gamePlayers.Value == 1 then???
pokemon ftw |
|
|
| Report Abuse |
|
|
llcoolj03
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 6135 |
|
|
| 14 Aug 2015 02:53 PM |
well, here's the whole script so you can understand everything
local maps = game.ServerStorage.Maps:GetChildren() local Intermission_Time = 25 -- How long it takes for another match to start after a previous one has ended local RewardPoints = 150 -- Points awarded to the round winner local PlayersRequired = 1 -- Least amount of players required to start a game local Time = 2.5 -- Waiting time between each message local MainGUI = script.Parent local Players = game.Players local gamePlayers = game.Workspace.gamePlayers
gameActive = MainGUI.gameActive --local RandomMap = (maps[math.random(1,#maps)])
if Players.NumPlayers >= PlayersRequired then --boring stuff for i = 25, 0, -1 do MainGUI.Text = "Intermission Time: "..i wait(1) end for i = 5, 0, -1 do MainGUI.Text = "The game will begin in "..i.." seconds." wait(1) end local RandomMap = (maps[math.random(1,#maps)]) map = RandomMap:Clone() map.Parent = game.Workspace.mapholder MainGUI.Text = "Map Chosen: "..map.Name wait(Time) MainGUI.Text = "Teleporting Players..." local spawns = map.Spawns:GetChildren() wait(1) --tp players for i,v in ipairs(game.Players:GetPlayers()) do v.Character:MoveTo(spawns[i].Position + Vector3.new(0,1,0)) end for i,v in ipairs(game.Players:GetPlayers()) do v.PlayerGui.Main.HUD["Alive"].Value = true v.PlayerGui.Main.HUD["inCurrentRound"].Value = true end for i = 1, 10 do gamePlayers.Value = Players.NumPlayers end print(gamePlayers.Value) for i,v in ipairs(game.Players:GetPlayers()) do v.Character.Humanoid.WalkSpeed = 0 end MainGUI.Text = "On your marks..." wait(2) MainGUI.Text = "Get set..." wait(2) MainGUI.Text = "Hunt!" for i,v in ipairs(game.Players:GetPlayers()) do v.Character.Humanoid.WalkSpeed = 16 end gameActive.Value = true for i = 120, 0, -1 do if gamePlayers.Value == 1 then for i,v in ipairs(game.Players:GetPlayers()) do a = v.PlayerGui.Main.HUD.Alive if a == true then MainGUI.Text = v.Name.." has won the round!" end end else wait(1) MainGUI.Text = "Time Remaining: "..i end end
end
|
|
|
| Report Abuse |
|
|
Scout9
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 255 |
|
|
| 14 Aug 2015 02:55 PM |
and maingui is.. a screengui?
pokemon ftw |
|
|
| Report Abuse |
|
|
llcoolj03
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 6135 |
|
| |
|
WATERBIN1
|
  |
| Joined: 26 Jan 2013 |
| Total Posts: 2733 |
|
| |
|
llcoolj03
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 6135 |
|
|
| 14 Aug 2015 02:57 PM |
.-.
That's for me to know and you to find out. |
|
|
| Report Abuse |
|
|
WATERBIN1
|
  |
| Joined: 26 Jan 2013 |
| Total Posts: 2733 |
|
|
| 14 Aug 2015 02:59 PM |
| k now giv meh ull ur tux and roberblux muney |
|
|
| Report Abuse |
|
|
llcoolj03
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 6135 |
|
| |
|
llcoolj03
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 6135 |
|
| |
|