I am trying to make generators for a thing I'm making, and once they're all off I want the fog to appear so it's difficult to see. I have two scripts, one to turn it on and off.
I am a noob at scripting, so please go easy on me!
if
workspace.LightSwitch1.ValueR = true
and
workspace.LightSwitch2.ValueE = true
and
workspace.LightSwitch3.ValueF = true
and
workspace.LightSwitch4.ValueD = true
then
wait(2.5)
script.parent.PowerOut.Play
wait()
game.Lighting.FogEnd = ("50")
end
And
if
workspace.LightSwitch1.ValueR = false
and
workspace.LightSwitch2.ValueE = false
and
workspace.LightSwitch3.ValueF = false
and
workspace.LightSwitch4.ValueD = false
then
wait(.5)
game.Lighting.FogEnd = ("999e999")
end

4 comments
It doesn't work. On both scripts the first equal signs are underlined with red, btw I have another value called "value," so that might ruin it.
add ".Value" behind all the Value objects
I think you’re supposed to use “==“ on conditional statements instead of “=“. Just replace all the “=“ with “==“ in the “if then” statement.
yep