Hello there, I tried making a script where if the BoolValue is set to true then the bulb will turn to neon and the lights will be enabled, and if the BoolValue is set to false then the bulb will become SmoothPlastic and the lights will be disabled
However it didn't worked even though it seems correct to me, what do I do? Thanks for feedbacks btw
local light = script.Parent.PointLight
local bulb = script.Parent
local day = game.Lighting.BooleanValue
while true do
if day.Value == true then
bulb.Material = Enum.Material.Neon
light.Range = 15
elseif day.Value == false then
bulb.Material = Enum.Material.SmoothPlastic
light.Range = 0
wait()
end
end
