of     1   

shish_kebab4
#184796110Saturday, March 05, 2016 4:55 PM GMT

It says "attempt to call global 'selectMap' (a nil value) 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",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
Hedr0n
#184796230Saturday, March 05, 2016 4:57 PM GMT

Select map doesn't have a value. You fix it
shish_kebab4
#184796971Saturday, March 05, 2016 5:08 PM GMT

Bump
Aethex
#184797243Saturday, March 05, 2016 5:12 PM GMT

Why are you bumping this? Create a selectMap function; it currently doesn't exist and you're trying to call it.
DeepBlueNoSpace
#184797297Saturday, March 05, 2016 5:13 PM GMT

local mapName = selectMap() It should be local mapName = pickMap()
shish_kebab4
#184797497Saturday, March 05, 2016 5:15 PM GMT

Thank you. I am new to scripting and I didn't know how to fix it. It's nice to know that there is someone who can read the thread title.

    of     1