I was wondering why I had invalid data for a script, then I tried to test math.random since it seemed to be coming from it's return values. This is what I got from the Lua console :
> return math.random(0.8, 1.2);
0.8
> return math.random(0.8, 1.2);
0.8
> return math.random(0.8, 1.2);
0.8
> return math.random(0.8, 1.2);
1.8
> return math.random(0.8, 1.2);
0.8
> return math.random(0.8, 1.2);
1.8
> return math.random(0.8, 1.2);
0.8
> return math.random(0.8, 1.2);
1.8
> return math.random(0.8, 1.2);
0.8
I am a little confused about the results I'm getting. Someone can clarify?
return (math.random(8,12)/10), which will return 0.8 to 1.2. - Josh0.8 + (math.radnom() * 0.4). This way, I have more precision variation. - Yanick Rochon