local Maps = {"Camp", "Theater", "Factory"} -- Example Maps
function PickMap()
--
local RandomMap = math.random(Maps)
print(RandomMap)
--
end
PickMap()
I’m trying to randomize the table: Maps but when I call math.random it expects a number, when Maps is a table/string.
math.random only accepts & returns integers. Try passing in the amount of strings in the table.
local Maps = {"Camp", "Theater", "Factory"} -- Example Maps
function PickMap()
--
local RandomMap = Maps[math.random(#Maps)]
print(RandomMap)
--
end
PickMap()