I wanted to make part change its transparency between 0 and 0.8 but for some reason it only selects 0
Here is my script
while wait(0.1) do
local randomize = math.random(0, 0.8)
print(randomize)
end
I wanted to make part change its transparency between 0 and 0.8 but for some reason it only selects 0
Here is my script
while wait(0.1) do
local randomize = math.random(0, 0.8)
print(randomize)
end
local randomize = math.random(0, 8) / 10
-- or
local randomize = Random.new():NextNumber(0, 0.8)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
math.random only generates whole numbers (0, 1, 2, 3, 4) not numbers like 2.22, the only exception is math.random() which generates random number from 0 to 1