BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 25 Apr 2014 09:27 AM |
--[[LezMakeAGame]] plrs = game.Players:GetPlayers() maps = game.Lighting:GetChildren() function selectMAP() local selectedMap = maps[math.random(1,#maps)] selectedMap:clone().Parent = Workspace name = selectedMap.Name Workspace[selectedMap.Name].Name = "Map" game.Workspace.Timer.Value = 301 print('1') repeat wait(1) game.Workspace.Timer.Value = game.Workspace.Timer.Value - 1 until game.Workspace.Timer.Value == 1 or plrs[2] == false print'2' ---- m = Instance.new("Message", Workspace) if plrs[2] == false then m.Text = "The winner was: "..plrs[1] wait(5) m:Destroy() selectedMap:Destroy() script.Disabled = true end if game.Workspace.Timer.Value == 1 then m.Text = "There was no winner, time ran out." wait(5) m:Destroy() selectedMap:Destroy() script.Disabled = true end print'3' end function tp() local spawns = Workspace.Map.Spawns:GetChildren() for i = 1, #plrs do plrs[i]:MoveTo(spawns.i.Position) print'5' sword = game.ServerStorage["Sword"]:clone() sword.Parent = plrs[i].Character end end if Workspace.GoReady.Value == true then selectMAP() print'6' tp() print'7' Workspace.GoReady.Value = false end while wait() do for i,v in pairs(game.Players:GetPlayers()) do if v.Character.Humanoid.Health == 0 then table.remove(plrs,i) print'4' end end end
I can't seem to figure out whats wrong with the TP function |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 25 Apr 2014 09:30 AM |
plrs[i]:MoveTo(spawns.i.Position) should be plrs.Character[i]:MoveTo(spawns[i].Position) and you need to update the plrs table since you only got it at the beginning of the game when there where no players. |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 25 Apr 2014 09:30 AM |
Typo'd. plrs[i].Character:MoveTo(spawns[i].Position)
|
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 25 Apr 2014 09:40 AM |
Didn't work http://www.roblox.com/Laundry-Day-Sword-Fighting-Simulation-place?id=154145112 In 'LezMakeAGame' |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 25 Apr 2014 12:36 PM |
| If you guys help me I promise I'll never come back to SH. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
| |
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 25 Apr 2014 01:41 PM |
"for i = 1, #plrs do plrs[i]:MoveTo(spawns.i.Position) print'5'()"
Should be
"for i = 1, #plrs do plrs[i].Character:MoveTo(spawns.i.Position) print'5'()" |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 25 Apr 2014 02:42 PM |
nope
--[[LezMakeAGame]] wait(5) plrs = game.Players:GetPlayers() maps = game.Lighting:GetChildren() function selectMAP() local selectedMap = maps[math.random(1,#maps)] selectedMap:clone().Parent = Workspace name = selectedMap.Name Workspace[selectedMap.Name].Name = "Map" game.Workspace.Timer.Value = 301 print('1') repeat wait(1) game.Workspace.Timer.Value = game.Workspace.Timer.Value - 1 until game.Workspace.Timer.Value == 1 or plrs[2] == false print'2' ---- m = Instance.new("Message", Workspace) if plrs[2] == false then m.Text = "The winner was: "..plrs[1].Name wait(5) m:Destroy() Workspace.Map:Destroy() script.Disabled = true end if game.Workspace.Timer.Value == 1 then m.Text = "There was no winner, time ran out." wait(5) m:Destroy() Workspace.Map:Destroy() script.Disabled = true end print'3' end function tp() local spawns = Workspace.Map.Spawns i = 1 for i,v in pairs(plrs) do v.Character:MoveTo(Workspace.Map.Spawns[i].Position+Vector3.new(0, 0, 0)) i = i+1 end print'5' end if Workspace.GoReady.Value == true then selectMAP() print'6' wait(0) tp() print'7' wait(0) Workspace.GoReady.Value = false end while wait() do for i,v in pairs(game.Players:GetPlayers()) do if v.Character.Humanoid.Health == 0 then table.remove(plrs,i) print'4' end end end |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|