I have it where the time changes from 3 to 8 after a certain amount of time. I want to make it where the windows will change to the yellow color during the night and turn black during the day. But, it just changes yellow entirely and stays yellow. I'm trying to use the GetMinutesAfterMidnight and a if true statement, it doesn't say anything is wrong. I'm not sure how this entirely works though, what numbers do I put? I just put 5 for now, but how many minutes after midnight should I put for it to work?
-- Variables
local Light = game.Lighting
local brick = script.Parent
-- Script
if Light:GetMinutesAfterMidnight(5) then
brick.Color = Color3.new(100,100,0)
else
brick.Color = Color3.new(0,0,0)
end
Is there a better way to write this?

3 comments
Thanks, I put it in a while true do, and put (3 * 12) after, and it works!
Wait, it still uh is yellow after it becomes day again the second time
just try using elseif Lighting:GetMinutesAfterMidnight([Whatever you want])