Here is the script
while true do wait() if game.Lighting.TimeOfDayLsub(1,3) == "18:" then script.Parent.SpotLight.Enabled = true end if game.Lighting.TimeOfDayLsub(1,3) == "07:" then script.Parent.SpotLight.Enabled = false end end
whenever it reaches 18:00:00 or anytime during 18:00:00 it doesn't turn on the light?
What's TimeOfDayLsub? I think you meant to write this...
while true do wait() if game.Lighting.TimeOfDay:sub(1,3) == "18:" then script.Parent.SpotLight.Enabled = true end if game.Lighting.TimeOfDay:sub(1,3) == "07:" then script.Parent.SpotLight.Enabled = false end end
Marked as Duplicate by TheeDeathCaster, HexC3D, M39a9am3R, and Articulating
This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.
Why was this question closed?