|
| 23 Nov 2012 05:47 PM |
How will I make it random?: map1 = game.Lighting:findFirstChild("Map1") map2 = game.Lighting:findFirstChild("Map2") map3 = game.Lighting:findFirstChild("Map3") map4 = game.Lighting:findFirstChild("Map4") map5 = game.Lighting:findFirstChild("Map5") time = 300 clone1 = map1:clone() clone2 = map2:clone() clone3 = map3:clone() clone4 = map4:clone() clone5 = map5:clone() wait() map1:remove() map2:remove() map3:remove() map4:remove() map5:remove() while true do local map = clone1:clone() map.Parent = game.Workspace wait(time) map:remove() local map = clone2:clone() map.Parent = game.Workspace wait(time) map:remove() local map = clone3:clone() map.Parent = game.Workspace wait(time) map:remove() local map = clone4:clone() map.Parent = game.Workspace wait(time) map:remove() local map = clone5:clone() map.Parent = game.Workspace wait(time) map:remove() end
function Map1Raise() for r = 1,236 do wait(0.01) for r,p in pairs(game.Workspace.Map1:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame + Vector3.new(0,2,0) end end end end function Map1Fall() for r = 1,236 do wait(0.01) for r,p in pairs(game.Workspace.Map1:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame - Vector3.new(0,2,0) end end end end
function Map2Raise() for r = 1,236 do wait(0.01) for r,p in pairs(game.Workspace.Map2:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame + Vector3.new(0,2,0) end end end end function Map2Fall() for r = 1,236 do wait(0.01) for r,p in pairs(game.Workspace.Map2:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame - Vector3.new(0,2,0) end end end end
function Map3Raise() for r = 1,236 do wait(0.01) for r,p in pairs(game.Workspace.Map3:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame + Vector3.new(0,2,0) end end end end function Map3Fall() for r = 1,236 do wait(0.01) for r,p in pairs(game.Workspace.Map3:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame - Vector3.new(0,2,0) end end end end
function Map4Raise() for r = 1,236 do wait(0.01) for r,p in pairs(game.Workspace.Map4:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame + Vector3.new(0,2,0) end end end end function Map4Fall() for r = 1,236 do wait(0.01) for r,p in pairs(game.Workspace.Map4:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame - Vector3.new(0,2,0) end end end end
function Map5Raise() for r = 1,236 do wait(0.01) for r,p in pairs(game.Workspace.Map5:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame + Vector3.new(0,2,0) end end end end function Map5Fall() for r = 1,236 do wait(0.01) for r,p in pairs(game.Workspace.Map5:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame - Vector3.new(0,2,0) end end end end
function Map1() local map = clone1:clone() local spawn = clone6:clone() map.Parent = game.Workspace spawn.Parent = game.Workspace wait(0.1) Map1Raise() wait(time) Map1Fall() wait(0.1) map:remove() spawn:remove() end
function Map2() local map = clone2:clone() local spawn = clone7:clone() map.Parent = game.Workspace spawn.Parent = game.Workspace wait(0.1) Map2Raise() wait(time) Map2Fall() wait(0.1) map:remove() spawn:remove() end
function Map3() local map = clone3:clone() local spawn = clone8:clone() map.Parent = game.Workspace spawn.Parent = game.Workspace wait(0.1) Map3Raise() wait(time) Map3Fall() wait(5) map:remove() spawn:remove() end
function Map4() local map = clone4:clone() local spawn = clone9:clone() map.Parent = game.Workspace spawn.Parent = game.Workspace wait(0.1) Map4Raise() wait(time) Map4Fall() wait(0.1) map:remove() spawn:remove() end
function Map5() local map = clone5:clone() local spawn = clone10:clone() map.Parent = game.Workspace spawn.Parent = game.Workspace wait(0.1) Map5Raise() wait(time) Map5Fall() wait(0.1) map:remove() spawn:remove() end
while true do Map1() wait() Map2() wait() Map3() wait() Map4() wait() Map5() wait() end |
|
|
| Report Abuse |
|
Zkiller11
|
  |
| Joined: 25 Aug 2009 |
| Total Posts: 2914 |
|
|
| 23 Nov 2012 05:49 PM |
| hey, why not try responding to the first thread instead of creating a new one, next time, will you? |
|
|
| Report Abuse |
|
|
| 23 Nov 2012 05:54 PM |
At least answer my question.. How will you make the map generating random? |
|
|
| Report Abuse |
|
Zkiller11
|
  |
| Joined: 25 Aug 2009 |
| Total Posts: 2914 |
|
|
| 23 Nov 2012 06:00 PM |
Did you look at the other thread?
Put the maps in a table, and use math.random on that table. |
|
|
| Report Abuse |
|