weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
| |
|
weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
| |
|
|
| 17 Dec 2013 04:39 PM |
MyList = {CFrameValue, StringValue, ObjectValue]
TheRandomThingFromMyList = MyList[math.random(#MyList)] |
|
|
| Report Abuse |
|
|
|
| 17 Dec 2013 04:40 PM |
MyList = {CFrameValue, StringValue, ObjectValue} -- oops I put a bracket there instead of a fancy curvy bracket, just fixed it.
TheRandomThingFromMyList = MyList[math.random(#MyList)] |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 17 Dec 2013 04:52 PM |
local randomsYouWant = {"a", "b", "pi", "test", ...} print(randomsYouWant[math.random(randomsYouWant)]) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 17 Dec 2013 04:52 PM |
| print(randomsYouWant[math.random(#randomsYouWant)])* |
|
|
| Report Abuse |
|
|
weewoo5
|
  |
| Joined: 25 Oct 2009 |
| Total Posts: 2281 |
|
|
| 19 Dec 2013 02:12 PM |
| eh, I knew that, I was kinda hoping for like random(Workspace.p1, Workspace.p2), its simpler. |
|
|
| Report Abuse |
|
|
GGGGG14
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25344 |
|
|
| 19 Dec 2013 02:23 PM |
Maps? Here:
Maps = {} for _, work in pairs(game.Workspace:GetChildren()) do if string.lower(work.Name:sub(1,3)) == "map" then table.insert(Maps,work) end end
RandomMap = Maps[math.random(1,#Maps)]
|
|
|
| Report Abuse |
|
|