I got some code from the "Map Chooser" wiki page from roblox. On a part of the script, it chooses a map. It picks from a folder called maps which is located in the ReplicatedStorage.
This is the line of code it is in (inside a function called "pickMap"):
local selectedIndex = math.random(1, #maps)
local map = mapList[selectedIndex]:Clone()
"maps" is a variable outside the function:
local maps = replicatedStorage:WaitForChild("Maps")
This is the error I get:
ServerScriptService.Script:9: attempt to get length of upvalue 'maps' (a userdata value)
If you want the whole page of code, search "Map Chooser" on the roblox wiki.
