This script is relatively simple-- the script gets the clocktime, multiplies it by 10, and sets that as the ambient in the game. It does essentially the same thing with the outdoor ambient, except it subtracts clocktime * 10 by 10.
clockTime = game.Lighting.ClockTime
while true do
game.Lighting.Ambient = Color3.new((clockTime * 10)/255,(clockTime * 10)/255,(clockTime * 10)/255)
game.Lighting.OutdoorAmbient = Color3.new(((clockTime * 10) - 10)/255,((clockTime * 10) - 10)/255,((clockTime * 10) - 10)/255)
wait(1)
end
It works upon running the game- set it to any time, run the script and it works. However, I also have a simple copy/paste day-to-night cycle script running as well:
minutesAfterMidnight = 0
while true do
minutesAfterMidnight = minutesAfterMidnight + 60
game.Lighting:SetMinutesAfterMidnight(minutesAfterMidnight)
wait(60)
end
and the ambient doesn't update with the time as it changes. Any suggestions on how to make this work? Thanks.

8 comments
Thanks!
Accept my answer if this helped!
Wait- how do I do that again? I haven't used this website in 6 months and I keep forgetting everytime I come back :/
Should be next to the report button. Don't click the report button, click the button that says accept answer near it.
Nope, even turned off my ad blocker and it isn't there. That's weird, I've never had that happen before.
Also another question, sorry that I didn't mention it in my earlier post but it just came to mind. When the clock time reaches 15, I want it to start subtracting the time instead of adding. Is there any way to tell the script to do that after the time reaches 15?
Why not turn all the addition symbols to subtraction? Makes sense, right?
What I meant is like, how I would tell the script to start doing that right at 15. I'd assume something like, if game.Lighting.ClockTime >= "15" then, but it errors.