4ef
|
  |
| Joined: 27 May 2013 |
| Total Posts: 5633 |
|
|
| 01 May 2015 10:20 PM |
local gui = game.StarterGui.GameGui.Frame.TextLabel.Text local s = game.Workspace.Sounds local maps = game.ServerStorage.Maps local weapons = game.ServerStorage.Weapons local spawn = game.ServerStorage.SpawnLocations local player = game.Players:GetPlayers() intermission = 30 play = 300
while true do for i = 1, #player do local r = (math.random(1,4)) for intermission = 30, 1, -1 do gui = "Intermission: " ..intermission end if r == 1 then wait() gui = "Starting New Round" wait(3) gui = "Choosing Game" wait(3) gui = "Game Type: Free For All Deathmatch Game Map: Free For All Regular" wait(5) gui = "Get Ready!" s.AFKSound:Play() wait(5) s.AFKSound:Stop() wait(1) maps.FFA:clone().Parent = game.Workspace wait(1) game.SpawnLocations:remove() player[i].Character:MoveTo(Vector3.new(-37,4.2, -479)) wait() weapons.HL:clone().Parent = player.Backpack for play = 300, 1, -1 do gui = "Time Remaining: " ..intermission end spawn:clone().Parent = game.Workspace wait(1) gui = "Game Over" wait() player[i].Character.Humanoid:UnequipTools() player[i].Backpack:ClearAllChildren() wait(5) game.Workspace.FFA:remove() player[i]:LoadCharacter() gui = " " end end end
4ef, 3ef, 5ef. Doesn't matter to me! |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 10:22 PM |
| r!==1 and the loop crashes |
|
|
| Report Abuse |
|
|
4ef
|
  |
| Joined: 27 May 2013 |
| Total Posts: 5633 |
|
|
| 01 May 2015 10:25 PM |
how do i fix?
4ef, 3ef, 5ef. Doesn't matter to me! |
|
|
| Report Abuse |
|
|
| |
|
4ef
|
  |
| Joined: 27 May 2013 |
| Total Posts: 5633 |
|
|
| 01 May 2015 10:29 PM |
what? just replace it "r == 1 then"?
4ef, 3ef, 5ef. Doesn't matter to me! |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 10:32 PM |
"while true do" >while wait() do |
|
|
| Report Abuse |
|
|
4ef
|
  |
| Joined: 27 May 2013 |
| Total Posts: 5633 |
|
|
| 01 May 2015 10:39 PM |
doesnt work
4ef, 3ef, 5ef. Doesn't matter to me! |
|
|
| Report Abuse |
|
|
4ef
|
  |
| Joined: 27 May 2013 |
| Total Posts: 5633 |
|
|
| 01 May 2015 10:55 PM |
bump
4ef, 3ef, 5ef. Doesn't matter to me! |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 01 May 2015 11:05 PM |
while wait() do --rest of code end
Also, use
for i,v in pairs(game.Players:GetChildren()) do v.Character:MoveTo(Vector3.new(-37,4.2, -479)) end
instead of for i = 1, #player do
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 May 2015 11:31 PM |
| ^ No, numerical for loops are fine and faster anyways. |
|
|
| Report Abuse |
|
|