local lightonoff = game.ReplicatedStorage.chamberlights
print("rr")
-- local colorchange = game.ReplicatedStorage.chamberlightsColor
lightonoff.Changed:Connect(function(v)
print("got it!!")
if v == false then
for _, i in pairs(script.Parent:GetChildren()) do
if i:IsA("SpotLight") or i:IsA("PointLight") then
if i.Parent:IsA("BasePart") then
i.Parent.BrickColor = BrickColor.new("Really black")
elseif i.Parent:IsA("UnionOperation") then
i.Parent.Color = Color3.fromRGB(0,0,0)
end
end
end
elseif v == true then
for _, i in pairs(script.Parent:GetChildren()) do
if i:IsA("SpotLight") or i:IsA("PointLight") then
if i.Parent:IsA("BasePart") then
i.Parent.BrickColor = BrickColor.new("Institutional white")
elseif i.Parent:IsA("UnionOperation") then
i.Parent.Color = Color3.fromRGB(255,255,255)
end
end
end
end
end)