How do I make a decent IF statement for the dsicribed scenario?
I'm trying to make a decal shown only if all lights were turned off, otherwise its transparency should just stay 1.
01 | local light 1 = game.Workspace.BathRoomLight 1. PointLight |
02 | local light 2 = game.Workspace.MyBedroom.WallLight 1. Lightpart.PointLight |
03 | local light 3 = game.Workspace.LightsM.Part 8. PointLight |
04 | local light 4 = game.Workspace.KitchenLight 1. LightPart.PointLight |
05 | local light 5 = game.Workspace.WallLightWater 1. Lightpart.PointLight |
06 | local light 6 = game.Workspace.WallLightTv 1. Lightpart.PointLight |
07 | local light 7 = game.Workspace.WallLightPc 1. Lightpart.PointLight |
08 | local light 8 = game.Workspace.Ceilinglight 1. LightPart.PointLight |
09 | local light 9 = game.Workspace.Light.LightPart.SurfaceLight |
10 | local d = game.Workspace.Display.Decal |
12 | local lights = { light 1 , light 2 , light 3 , light 4 , light 5 , light 6 , light 7 , light 8 , light 9 , |
20 | if lights [ i ] .Enabled = = false then |
28 | print ( "You can see me now" ) |
32 | lights [ i ] .Changed:Connect( function () |