So i have an module script i want to take math.random() information from but it wont work i want it to print "Hole1" or "Hole2" cause thats the only two i have left but i don't want to write print(math.random(Module.Hole1)) every time i want that map i want to to be random and if i add another map name to the module script then it would print the choosen map
Heres the module script:
local Holes = {
Strokes = 0,
["Hole1"] = {
["ss"] = 1,
["gg"] = 2,
["hh"] = 3,
["sss"] = 4,
["assaggasg"] = 5,
["hdhjhdjdj"] = 6
} ,
["Hole2"] = {
["fhjdfudfui"] = 1,
["random"] = 2,
["random one more"] = 3,
["idk whu"] = 4,
["i sjould now"] = 5,
["hello"] = 6
}
}
return Holes
That is just random map names for now
Here's the server script:
print(math.random(Module))

1 comment
You could just make the module script do math.random by itself, so you just have to do print(Module)