-- Turning On and off script
Light = script.Parent.PointLight
while wait() do
if game.Lighting.TimeOfDay == "19:00:00" then
Light.Enabled = true
script.Parent.Material = "Neon"
else if game.Lighting.TimeOfDay == "06:00:00" then
Light.Enabled = false
script.Parent.Material = "DiamondPlate"
end
end
end
Is it just server lag or does the first if statement not work?
So I have this loop running in about 17 lamps in my game. All functioning in a regular script. Most simple job ever. Turn on at This and That time.
It turns off at 6:00:00, but it won't turn on at 19:00:00 UNIX time. Would a function work better in this situation?
Help?

2 comments
I was right about the script moving too fast, but this script is a bit cleaner in my opinion. Thanks! :)
No problem ;)