? Transparency is not a valid member of BoolValue "Workspace.Construction ?
Asked by
2 years ago Edited 2 years ago
I want all my lights to turn on and off if Switch = true
Error I get
Transparency is not a valid member of BoolValue "Workspace.Construction lights.Light Arrow.Switch"
01 | game.ReplicatedStorage [ "Light Settings" ] [ "Left Lights" ] .OnServerEvent:Connect( function () |
02 | local Switch = script.Parent [ "Light Arrow" ] .Switch |
05 | while Switch.Value = = true do |
06 | local ConLights = script.Parent [ "Light Arrow" ] |
07 | for _, ConLights in ipairs (ConLights:GetChildren()) do |
08 | ConLights.Transparency = 0 |
10 | ConLights.Transparency = 1 |
Updated script
01 | game.ReplicatedStorage [ "Light Settings" ] [ "Left Lights" ] .OnServerEvent:Connect( function () |
03 | local Switch = script.Parent.Switch |
04 | local ConLights = script.Parent [ "Light Arrow" ] :WaitForChild(script.Parent [ "Light Arrow" ] .LPart, 12 ) |
05 | while Switch.Value = = true do |
07 | for _, ConLights in ipairs (script.Parent [ "Light Arrow" ] :GetChildren()) do |
08 | ConLights.Transparency = 0 |
10 | ConLights.Transparency = 1 |
If you need a screenshot of what the explorer looks like let me know.