mokmok74
|
  |
| Joined: 30 Apr 2010 |
| Total Posts: 166 |
|
|
| 20 Mar 2015 12:51 PM |
this script that i made gets stuck on Deciding what game to play
Code:
minigames = game.Lighting.Minigames:GetChildren()
h = Instance.new("Hint", game.workspace)
while true do
if game.Players.NumPlayers > 1 then h.Text = "Deciding which map to play" wait(10) ranGame = math.random(3, #minigames) gameChosen = minigames[ranGame] h.Text = "Map chosen: " .. gameChosen.Name wait(3) h.Text = "Team DeathMatch!" wait(2) h.Text = "Get as much Tag as Possible!" wait(4) gameChosenClone = gameChosen:Clone() gameChosenClone.Parent = game.Workspace wait(4) --Teleporting Players to Spawn. spawns = gameChosenClone.Spawns:GetChildren() for i,v in pairs(game.Players:GetPlayers()) do name = v.Name check = game.Workspace:FindFirstChild(name) if check then checkHumanoid = check:FindFirstChild("Humanoid") if checkHumanoid then check:MoveTo(spawns[i].Position) end end end for i = 2, 1, -1 do h.Text = "Time Lift: " .. i wait (1) end --Countdown until the game ends for i = 500, 1, -1 do h.Text = "Time left: " .. i wait(1) end h.Text = "Game Ended!" wait(1) gameChosenClone:Destroy() else h.Text = "There Needs To Be More Than One Player" end wait(5) |
|
|
| Report Abuse |
|
mokmok74
|
  |
| Joined: 30 Apr 2010 |
| Total Posts: 166 |
|
|
| 20 Mar 2015 12:52 PM |
Wrong script
Code:
minigames = game.Lighting.Minigames:GetChildren()
h = Instance.new("Hint", game.workspace)
while true do
if game.Players.NumPlayers > 1 then h.Text = "Deciding which map to play" wait(10) ranGame = math.random(3, #minigames) gameChosen = minigames[ranGame] h.Text = "Map chosen: " .. gameChosen.Name wait(3) h.Text = "Team DeathMatch!" wait(2) h.Text = "Get as much Tag as Possible!" wait(4) gameChosenClone = gameChosen:Clone() gameChosenClone.Parent = game.Workspace wait(4) --Teleporting Players to Spawn. spawns = gameChosenClone.Spawns:GetChildren() for i,v in pairs(game.Players:GetPlayers()) do name = v.Name check = game.Workspace:FindFirstChild(name) if check then checkHumanoid = check:FindFirstChild("Humanoid") if checkHumanoid then check:MoveTo(spawns[i].Position) end end end for i = 2, 1, -1 do h.Text = "Time Lift: " .. i wait (1) end --Countdown until the game ends for i = 500, 1, -1 do h.Text = "Time left: " .. i wait(1) end h.Text = "Game Ended!" wait(1) gameChosenClone:Destroy() else h.Text = "There Needs To Be More Than One Player" end wait(5) |
|
|
| Report Abuse |
|