jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
|
| 10 Sep 2013 04:05 PM |
i want to do math.random(10,50)
but I only want it to do 10,20,30,40, and 50. not the ones in between.
can i do this?
--@Jd678RBLX |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 04:07 PM |
| math.random(10,20,30,40,50) |
|
|
| Report Abuse |
|
|
jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
|
| 10 Sep 2013 04:08 PM |
oh, derp thanks
--@Jd678RBLX |
|
|
| Report Abuse |
|
|
jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
|
| 10 Sep 2013 04:10 PM |
nope
wrong number of arguments
--@Jd678RBLX |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 04:11 PM |
local numbers={10,20,30,40,50} print(math.random(1,#numbers)
That should work |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 04:13 PM |
| Oh woops forgot to end the print brackets on it. Just put an extra ) on the end of that print statement |
|
|
| Report Abuse |
|
|
jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
|
| 10 Sep 2013 04:15 PM |
nope
that gets a number between 1, and #numbers
so like, 2 could be an output
--@Jd678RBLX |
|
|
| Report Abuse |
|
|
jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
|
| 10 Sep 2013 04:16 PM |
could i do
math.random(10,50)
and round it up?
--@Jd678RBLX |
|
|
| Report Abuse |
|
|
jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
|
| 10 Sep 2013 04:20 PM |
nvm i figured out a way to do it
local num = math.random(1,10) local realnum = num * 10
lol
--@Jd678RBLX |
|
|
| Report Abuse |
|
|