Here I have some code for loading a random map. Every time I launch the server, it loads map #2 (there are 5).
function loadMap(x)
local maps = Maps:GetChildren()
for i = 1, #maps do
if maps[i].Value == x then
print(maps[i].MapName.Value)
maps[i].Model.Parent = game.Workspace
end
end
end
function loadRandomMap()
math.randomseed(tick())
local mapNum = math.random(Options.Maps.Value)
if mapNum == System.CurrentMap.Value then
math.randomseed(tick())
local mapNum = math.random(Options.Maps.Value)
end
System.CurrentMap.Value = mapNum
loadMap(mapNum)
end

1 comment
I tried it, but now it just chooses either #4 or #2