ok. so;
01 | L = script.Parent.PointLight |
02 |
03 | function RNG() |
04 |
05 | local N = math.random(. 1 , 1.2 ) |
06 | L.Brightness = N |
07 | end |
08 |
09 | while true do |
10 | wait(math.random(. 7 , 1.4 )) |
11 | RNG() |
12 | end |
The wait random timer works fine, however, when the brightness gets changed by the "RNG" function it only goes from one brightness, then to zero, and doesn't even stay within the random parameters. (It flips back and forth from zero to one brightness each time the while true loop runs)
math.random doesn't go into decimals, you would have to divide the random number if you wanted that
01 | L = script.Parent.PointLight |
02 |
03 | function RNG() |
04 | local N = math.random( 1 , 12 ) / 10 |
05 | L.Brightness = N |
06 | end |
07 |
08 | while true do |
09 | wait(math.random( 7 , 14 ) / 10 ) |
10 | RNG() |
11 | end |