|
| 08 Jul 2015 11:34 PM |
like this? randomxz = math.random(0.4,1) randomy = math.random(0.8,1.8) x.Size = Vector3.new(randomxz,randomy,randomxz) |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 11:34 PM |
im pretty sure it can
<3 cats <3 |
|
|
| Report Abuse |
|
|
| |
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
| |
|
|
| 08 Jul 2015 11:38 PM |
| i think its a whole number only not sure |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 11:39 PM |
If you did it like this, then yes.
local whole = math.random(1,10) local decimal = math.random(0,9)
print (whole..decimal) |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 08 Jul 2015 11:41 PM |
do this
local randomxz=math.random(0.4*100,1) x.Size=Vector3.new(randomxz/100,0,0) |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 08 Jul 2015 11:44 PM |
or
function randomDecimal(num1,num2) return math.random(num1%1==0 and num1 or num1*100,num2%1==0 and num2 or num2*100)/100 end |
|
|
| Report Abuse |
|
|
KoreanBBQ
|
  |
| Joined: 06 Mar 2015 |
| Total Posts: 1436 |
|
|
| 09 Jul 2015 12:06 AM |
| who cares just do math.random(0,100)/math.random(1,100) |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 09 Jul 2015 12:15 AM |
or if you don't want to get ridiculously erratic non terminating numbers, do this
math.random(0,100)/100 |
|
|
| Report Abuse |
|
|
KoreanBBQ
|
  |
| Joined: 06 Mar 2015 |
| Total Posts: 1436 |
|
|
| 09 Jul 2015 12:18 AM |
or, my favourite, tick()/math.random(0,100)-math.floor(tick()/math.random(0,100)) |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 09 Jul 2015 12:20 AM |
| now that's just uneccesary. also you don't get to restrict the range of the number |
|
|
| Report Abuse |
|
|
KoreanBBQ
|
  |
| Joined: 06 Mar 2015 |
| Total Posts: 1436 |
|
|
| 09 Jul 2015 12:22 AM |
woops forgot (tick()/math.random(0,100)-math.floor(tick()/math.random(0,100)))%math.random(0,100) |
|
|
| Report Abuse |
|
|
KoreanBBQ
|
  |
| Joined: 06 Mar 2015 |
| Total Posts: 1436 |
|
|
| 09 Jul 2015 12:22 AM |
wait nvm what i just did doesnt return a decimal. the one before does!! |
|
|
| Report Abuse |
|
|