So, I'm making a game where there has to be a chosen map but when I try to use math.random on it, it gives me an error:
attempt to get length of a userdata value
Here's the script I used:
local Maps = game.ServerStorage.Maps
while true do
local chosenMap = Maps[math.random(1, #Maps)]
print(chosenMap.Name)
end
This is getting very annoying. Am I doing something wrong?

2 comments
I'm very stupid I forgot to add :GetChildren(). Anyways, thanks for reminding! I hope I don't forget it again...
Haha, no worries.