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"
game.ReplicatedStorage["Light Settings"]["Left Lights"].OnServerEvent:Connect(function()
local Switch = script.Parent["Light Arrow"].Switch
while true do
wait(1)
while Switch.Value == true do
local ConLights = script.Parent["Light Arrow"]
for _, ConLights in ipairs(ConLights:GetChildren()) do
ConLights.Transparency = 0
wait(1)
ConLights.Transparency = 1
end
end
end
end)
Updated script
game.ReplicatedStorage["Light Settings"]["Left Lights"].OnServerEvent:Connect(function()
local Switch = script.Parent.Switch
local ConLights = script.Parent["Light Arrow"]:WaitForChild(script.Parent["Light Arrow"].LPart, 12)
while Switch.Value == true do
task.wait()
for _, ConLights in ipairs(script.Parent["Light Arrow"]:GetChildren()) do
ConLights.Transparency = 0
wait(1)
ConLights.Transparency = 1
end
end
end)
If you need a screenshot of what the explorer looks like let me know.

3 comments
Thx for your help I finally got the error removed but all the parts in ["Light Arrow"] which is a model within a model I updated my script with the new code
If that's the case, you should mark this answer as accepted.
ok!! Then New post