How i make two lights on when i press a button? i have this script
function LightSwitchwork()
local state = script.Parent.Parent.Parent.LightState
local switch = script.Parent
local lamp = state.Parent.Light.Lamp
local light = state.Parent.Light.Lamp.SurfaceLight
local bulb1 = lamp.Parent.Bulbs.bulb1
local bulb2 = lamp.Parent.Bulbs.bulb2
if state.Value == false then
state.Value = true
lamp.BrickColor = BrickColor.new("Pastel yellow")
lamp.Transparency = 0.8
light.Enabled = true
switch.CFrame = switch.CFrame*CFrame.fromEulerAnglesXYZ(0,0,0.4)
else
state.Value = false
lamp.BrickColor = BrickColor.new("Medium stone grey")
lamp.Transparency = 0.2
light.Enabled = false
end
end
script.Parent.ClickDetector.MouseClick:connect(LightSwitchwork)
but only works with one of the lights, Someone can help? Thanks.
