menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripting Helpers
:Random?
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
:Random?
Exudo
Join Date: 2010-03-03
Post Count: 174
#64223882
Monday, March 12, 2012 8:24 PM GMT
I'm making a mini game, and i don't know how to make it so it chooses a random map.
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
NewFissy
Join Date: 2011-01-03
Post Count: 1303
#64224074
Monday, March 12, 2012 8:27 PM GMT
ModelWithMaps = game.Lighting.Maps RandomMap = ModelWithMaps:GetChildren()[math.random(1,#ModelWithMaps:GetChildren())]
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
Exudo
Join Date: 2010-03-03
Post Count: 174
#64224100
Monday, March 12, 2012 8:27 PM GMT
Thanks ;)
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
NXTBoy
Join Date: 2008-08-25
Post Count: 4533
#64227214
Monday, March 12, 2012 9:12 PM GMT
Don't get the children twice! local maps = game.Lighting.Maps:GetChildren() local theMap = maps[math.random(#maps)]
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right