Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Random MiniGame Chooser?

Just before I start, I don't have a script. Sorry! NOW THE QUESTION SHALL BEGIN

So, I'm planning on making a MiniGame place, with all sorts of fun stuff. I know how do to everything, but one simple thing.

I'm having trouble using the math.random thingy {I'm not a very good scripter so don't expact good scripting language from me... LOL} picking out random minigames. I have all of my minigames ia lighting, just how do I randomly choose one in a script?

That's my question for today _______________ -=Lukeisbossman64=-

1 answer

local minigames = game.ServerStorage.Minigames:GetChildren()
local rg = math.random(1, #minigames)
local cg = minigames[rg]
local cgc = cg:Clone()
cgc.Parent = workspace

Incase you have any more questions, I recommend watching this video: https://www.youtube.com/watch?v=qyrzB50IKuY

This discussion is preserved as it was. New answers, comments, and votes are closed.