of     1   

RileysVideos
#225818266Sunday, October 01, 2017 9:27 AM GMT

local replicatedStorage = game:GetService("ReplicatedStorage") local maps = replicatedStorage:WaitForChild("Maps") function pickMap() local mapList = maps:GetChildren() -- Declares a table of the maps inside of the Maps folder. local selectedIndex = math.random(1,#maps) -- Choose a random number between 1, and the number of maps available. local map = mapList[selectedIndex]:Clone() -- Create a clone of the map we selected. map.Parent = workspace -- Parent it to the workspace. map.Name = "Map" -- Rename the map so that we can use the unloadMap() function later to remove it. return mapList[selectedIndex].Name -- Return the name of the map we selected, in case we want to display it. end function unloadMap() if workspace:FindFirstChild("Map") then -- If there is a model in the Workspace named "Map" workspace.Map:Destroy() -- Destroy it! end end local h = Instance.new("Hint") h.Parent = workspace while true do h.Text = "Picking new map..." wait(3) local mapName = selectMap() h.Text = "Selected map: "..mapName wait(3) h.Text = "Unloading map..." unloadMap() wait(3) end twitch.tv/rileybellev
LeafDoode
#225818334Sunday, October 01, 2017 9:30 AM GMT

did you just put that script without doing anything #code for i,v in pairs(Roblox.Forums:GetChildren()) if v.Name ~= "Game Creation and Development" then v:Destroy() end end
RileysVideos
#225818357Sunday, October 01, 2017 9:31 AM GMT

http://wiki.roblox.com/index.php?title=Map_Chooser i did what the wiki did twitch.tv/rileybellev
LeafDoode
#225818375Sunday, October 01, 2017 9:32 AM GMT

well did you add the maps check the output and tell me what it says. #code for i,v in pairs(Roblox.Forums:GetChildren()) if v.Name ~= "Game Creation and Development" then v:Destroy() end end
RileysVideos
#225818428Sunday, October 01, 2017 9:35 AM GMT

5:34:26.835 - ServerScriptService.MainScript:25: attempt to call global 'selectMap' (a nil value) twitch.tv/rileybellev
RileysVideos
#225818466Sunday, October 01, 2017 9:36 AM GMT

local mapName = selectMap() somethings wrong with that twitch.tv/rileybellev
LeafDoode
#225818509Sunday, October 01, 2017 9:39 AM GMT

"selectMap()" I don't see that as a function you could just use something like this local mapName = randomMap.Name #code for i,v in pairs(Roblox.Forums:GetChildren()) if v.Name ~= "Game Creation and Development" then v:Destroy() end end
RileysVideos
#225818569Sunday, October 01, 2017 9:42 AM GMT

still errors twitch.tv/rileybellev
JarodOfOrbiter
#225818585Sunday, October 01, 2017 9:43 AM GMT

selectMap is probably meant to be pickMap. It looks like someone forgot to test after refactoring.
LeafDoode
#225818637Sunday, October 01, 2017 9:45 AM GMT

local rp = game:GetService("ReplicatedStorage") local mps = rp:WaitForChild("Maps") local ms = workspace.MS function loadMap() local maps = mps:GetChildren() local randomMap = maps[math.random(1,#maps)] if randomMap then randomMap:Clone().Parent = ms end end function unLoad() ms:ClearAllChildren() end #code for i,v in pairs(Roblox.Forums:GetChildren()) if v.Name ~= "Game Creation and Development" then v:Destroy() end end #code for i,v in pairs(Roblox.Forums:GetChildren()) if v.Name ~= "Game Creation and Development" then v:Destroy() end end

    of     1