TheWisest
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 7345 |
|
|
| 07 Feb 2012 01:02 PM |
So I'm making a scavenger hunt game, and I need a little help with a script. (THIS IS NOT A REQUEST!)
So I have this script that randomly chooses a map out of a model in lighting called 'Maps', but I don't really how to make it randomly choose just one map at a time...
Here's what I have so far:
Maps = game.Lighting.Maps
PlayTime = 120
LobbyTime = 15
MapName = Instance.new("Message")
MapName.Parent = nil
--------------------------- while true do wait(LobbyTime) for i,v inpairs(Maps) do v:GetChildren() ---------------------------
Thanks. :)
~TheWisest~ |
|
|
| Report Abuse |
|
|
|
| 07 Feb 2012 01:04 PM |
local map = game.Lighting,Maps:GetChildren() map[math.random(1,#map)]:Clone().Parent = Workspace
that should work.
~I script Awesome sauce to go with my spaghetti code |
|
|
| Report Abuse |
|
|
TheWisest
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 7345 |
|
|
| 07 Feb 2012 01:06 PM |
I'll test it, thanks.
~TheWisest~ |
|
|
| Report Abuse |
|
|
TheWisest
|
  |
| Joined: 11 Nov 2010 |
| Total Posts: 7345 |
|
|
| 07 Feb 2012 01:14 PM |
That worked! Thanks a ton! :D
~TheWisest~ |
|
|
| Report Abuse |
|
|