|
| 28 Feb 2015 03:29 PM |
local mapsfolder = game.ServerStorage:WaitForChild("MapsFolder") local currentmapfolder = game.Workspace:WaitForChild("CurrentMapFolder") local maps = mapsfolder:GetChildren()
while true do for _,v in pairs(maps) do local mapchoice = math.random(1, #maps) end end
I made it this far, how would I clone "Mapchoice" into the currentmapfolder? |
|
|
| Report Abuse |
|
|
Razurix
|
  |
| Joined: 30 Sep 2011 |
| Total Posts: 5376 |
|
|
| 28 Feb 2015 03:30 PM |
local mapsfolder = game.ServerStorage:WaitForChild("MapsFolder") local currentmapfolder = game.Workspace:WaitForChild("CurrentMapFolder") local maps = mapsfolder:GetChildren()
while true do for _,v in pairs(maps) do local mapchoice = math.random(1, #maps) mapchoice:Clone() mapchoice.Parent = currentmapfolder end end
Shut your pie hole |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 28 Feb 2015 03:31 PM |
| mapchoice:Clone().Parent = currentmapfolder |
|
|
| Report Abuse |
|
|
|
| 28 Feb 2015 03:32 PM |
| 15:31:45.190 - Workspace.MainScript:8: attempt to index local 'mapchoice' (a number value) |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 28 Feb 2015 03:33 PM |
local mapchoice = maps[math.random(1, #maps)]
mapChoice:Clone().Parent = currentmapfolder |
|
|
| Report Abuse |
|
|
Razurix
|
  |
| Joined: 30 Sep 2011 |
| Total Posts: 5376 |
|
| |
|