How to fix script not working even though condition is successful? [Solved]
This question has been solved by the original poster.
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
01 | local light = script.Parent.PointLight |
02 | local bulb = script.Parent |
03 | local day = game.Lighting.BooleanValue |
06 | if day.Value = = true then |
07 | bulb.Material = Enum.Material.Neon |
09 | elseif day.Value = = false then |
10 | bulb.Material = Enum.Material.SmoothPlastic |