Map Chooser script not working saying that selectMap() needs to be defined??
I'm trying to make a map chooser for the minigame server I'm making and it says that the selectMap() at line 24 needs to be defined. I don't know what to do?!??!?
01 | local replicatedStorage = game:GetService( "ReplicatedStorage" ) |
02 | local maps = replicatedStorage:WaitForChild( "Maps" ) |
05 | local mapList = maps:GetChildren() |
06 | local selectedIndex = math.random( 1 ,#maps) |
07 | local map = mapList [ selectedIndex ] :Clone() |
08 | map.Parent = workspace |
10 | return mapList [ selectedIndex ] .Name |
14 | if workspace:FindFirstChild( "Map" ) then |
15 | workspace.Map:Destroy() |
19 | local h = Instance.new( "Hint" ,workspace) |
22 | h.Text = "Picking new map..." |
24 | local mapName = selectMap() |
25 | h.Text = "Selected map: " ..mapName |
27 | h.Text = "Unloading map..." |