madiik
|
  |
| Joined: 10 Feb 2009 |
| Total Posts: 625 |
|
|
| 07 Dec 2012 06:56 AM |
function reset() for i = 15, 1, -1 do print ("New game will start in "..i.." seconds") wait (1) end
Maps = {game.Lighting.WarTown, game.Lighting.FarLands} NumMaps = 2 --Number of maps
RandomChoice = math.random(1, NumMaps) CurrentMap = Maps[RandomChoice] CurrentMap:clone().Parent = game.Workspace
wait(40) for i,v in pairs(game.Players:GetPlayers()) do if v.Character ~= nil then if v.Character.Humanoid ~= nil then v.Character.Humanoid.Health = 0 end end end
local Map = game.Workspace:findFirstChild("WarTown", "FarLands") if map then map:remove() end
end
reset()
I got the round system working, But after that it won't complete the function really. It doesn't remove the map that i have? What's the problem. |
|
|
| Report Abuse |
|
|
lombardo2
|
  |
| Joined: 30 Nov 2008 |
| Total Posts: 1604 |
|
|
| 07 Dec 2012 07:00 AM |
function reset() for i = 15, 1, -1 do print ("New game will start in "..i.." seconds") wait (1) end
Maps = {game.Lighting.WarTown, game.Lighting.FarLands}
RandomChoice = math.random(1, #Maps) CurrentMap = Maps[RandomChoice]:Clone() CurrentMap.Parent = Workspace
wait(40) for i,v in pairs(game.Players:GetPlayers()) do if v.Character ~= nil then if v.Character.Humanoid ~= nil then v.Character.Humanoid.Health = 0 end end end
CurrentMap:Destroy()
end
reset() |
|
|
| Report Abuse |
|
|
madiik
|
  |
| Joined: 10 Feb 2009 |
| Total Posts: 625 |
|
|
| 07 Dec 2012 07:02 AM |
Instead of making lots of lines i should use CurrentMap:Destroy()? We'll im gonna test it. Then see if CS 1.6 Round system works for it. P.S i added wait(40) so I don't need to wait for like 5 minutes, I'm testing it, Later adding it to wait(300) |
|
|
| Report Abuse |
|
|
madiik
|
  |
| Joined: 10 Feb 2009 |
| Total Posts: 625 |
|
|
| 07 Dec 2012 07:05 AM |
| Okay That is still a problem. I waited for 40 seconds and nothing happened. |
|
|
| Report Abuse |
|
|
madiik
|
  |
| Joined: 10 Feb 2009 |
| Total Posts: 625 |
|
| |
|
lombardo2
|
  |
| Joined: 30 Nov 2008 |
| Total Posts: 1604 |
|
|
| 07 Dec 2012 07:12 AM |
| Lawl, then it's your script, I just stored the clone in CurrentMap so I can later destroy it. |
|
|
| Report Abuse |
|
|