Hi, I'm trying to make a game like lava escape. I'm sure you all from years ago may know it. So, I'm trying to make a map choosing system which chooses a random map. I'm using a test script to see what it'd choose by name. NOTE: I'm not good at choosing map scripts aswell as math.random. So, um, heres my script. I'd be happy to accept your answers once done.
Workspace Script
local rps = game:GetService("ReplicatedStorage")
local maps = rps.gms --Gms is the maps, in rps.
while wait(3) do
for i,v in pairs(maps:GetChildren()) do
local mapchosen = math.random(maps) --Error Occurs at this line.
print(mapchosen)
end
end
--Output Message: 18:51:03.367 - Workspace.Script:8: bad argument #1 to 'random' (number expected, got Object)
