So. What I am trying to do is if the time is in-between "17:00:00" and "04:00:00" (game time) then the lights are turned on, but what I am also trying to do is change the material of the light itself.
while wait() do
if game.Lighting.TimeOfDay >= "17:00:00" and game.Lighting.TimeOfDay <= "06:00:00" then
script.Parent.PointLight.Enabled = true
script.Parent.Material = Enum.Material.Neon
else
script.Parent.PointLight.Enabled = false
script.Parent.Material = Enum.Material.Plastic
end
end

1 comment
Sorry, I tried to code on my phone. It didn't work very well as I couldn't test it. I got it the wrong way round and missed a ) on the end of the .Changed function. Hope this works for you!