I have a light brick I'm working on that flickers between on and off at random. Either a 0 or 1 transparency for the neon brick to have it glow or not, and a brightness of 0 or 0.7 The current script does not do what I want, obviously, but I cannot figure out how to make the brightness change when the transparency does. Here's what I have now, which obviously turns the light off when the neon is on, which is backwards.
while true do
script.Parent.Transparency = math.random(0,1)
script.Parent.PointLight.Brightness = script.Parent.Transparency
wait(math.random(1,15)*0.1)
end
I'm just wondering if there is a way to make the Brightness 0.7 when the Transparency is 0, and 0 when the Transparency is 1, without explicitly typing all that out.

1 comment
use an if then statement.