Here is what I wrote:
local pos = math.random(0.06,0.65)
Here is what I wrote:
local pos = math.random(0.06,0.65)
math.random() only takes integers. If you wish to have a randomly generated decimal you need to divide the generated integer by a certain number. For example, to get a random decimal from 0.06 to 0.65:
local num = math.random(6, 65) / 100
Your script is correct.
But it doesn't work it prints out 0 every time
math.Random only supports integers. You can't have decimals.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
please use this, this is correct lol