So I am trying to get a number between a negative and a positive number but it just rounds.
I have tried this:
local random = Random.new()
local changeCooldown = (random:NextInteger(-0.5, 0.5))
but that rounds the number.
So I am trying to get a number between a negative and a positive number but it just rounds.
I have tried this:
local random = Random.new()
local changeCooldown = (random:NextInteger(-0.5, 0.5))
but that rounds the number.
For those wondering, this is how he did it:
local random = Random.new();
local changeCooldown = random:NextNumber() - 0.5;
That’ll get you a decimal between -0.5 to 0.5
I used :NextNumber and it worked!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.