The goal is to make a day and night cycle that also changes the ambient of the game. For example, when it is night, the ambient is darker - when it is day, the ambient is lighter.
I am using this script for a Day/Night cycle:
local speed = .2
time = game:service("Lighting"):GetMinutesAfterMidnight()
local full = 60 * 60 * 12
while true do
time = (time + wait()/60*speed)
game:service("Lighting"):SetMinutesAfterMidnight(time)
if time >= full then time = time - full end
end
As for the ambient changes, I tried using this but it is always slightly dark even in broad daylight!
Intensity = game.Lighting
while true do
game.Lighting.TimeOfDay = "00:00:00"
Intensity.Ambient = Color3.new (0, 0, 0)
Intensity.OutdoorAmbient = Color3.new (0,0,0)
wait(90)
game.Lighting.TimeOfDay = "03:00:00"
Intensity.Ambient = Color3.new (0, 0, 0)
Intensity.OutdoorAmbient = Color3.new (0,0,0)
wait(60)
game.Lighting.TimeOfDay = "05:00:00"
Intensity.Ambient = Color3.new (0.15, 0.15, 0.15)
Intensity.OutdoorAmbient = Color3.new (0.15, 0.15, 0.15)
wait(30)
game.Lighting.TimeOfDay = "06:00:00"
Intensity.Ambient = Color3.new (0.3, 0.3, 0.3)
Intensity.OutdoorAmbient = Color3.new (0.3, 0.3, 0.3)
wait(60)
game.Lighting.TimeOfDay = "08:00:00"
Intensity.Ambient = Color3.new (0.45, 0.45, 0.45)
Intensity.OutdoorAmbient = Color3.new (0.45, 0.45, 0.45)
wait(60)
game.Lighting.TimeOfDay = "10:00:00"
Intensity.Ambient = Color3.new (0.6, 0.6, 0.6)
Intensity.OutdoorAmbient = Color3.new (0.6, 0.6, 0.6)
wait(60)
game.Lighting.TimeOfDay = "12:00:00"
Intensity.Ambient = Color3.new (0.7, 0.7, 0.7)
Intensity.OutdoorAmbient = Color3.new (0.7, 0.7, 0.7)
wait(90)
game.Lighting.TimeOfDay = "15:00:00"
Intensity.Ambient = Color3.new (0.65, 0.65, 0.65)
Intensity.OutdoorAmbient = Color3.new (0.65, 0.65, 0.65)
wait(60)
game.Lighting.TimeOfDay = "17:00:00"
Intensity.Ambient = Color3.new (0.6, 0.6, 0.6)
Intensity.OutdoorAmbient = Color3.new (0.6, 0.6, 0.6)
wait(30)
game.Lighting.TimeOfDay = "18:00:00"
Intensity.Ambient = Color3.new (0.55, 0.55, 0.55)
Intensity.OutdoorAmbient = Color3.new (0.55, 0.55, 0.55)
wait(30)
game.Lighting.TimeOfDay = "19:00:00"
Intensity.Ambient = Color3.new (0.35, 0.35, 0.35)
Intensity.OutdoorAmbient = Color3.new (0.35, 0.35, 0.35)
wait(30)
game.Lighting.TimeOfDay = "20:00:00"
Intensity.Ambient = Color3.new (0.25, 0.25, 0.25)
Intensity.OutdoorAmbient = Color3.new (0.25, 0.25, 0.25)
wait(90)
game.Lighting.TimeOfDay = "23:00:00"
Intensity.Ambient = Color3.new (0, 0, 0)
Intensity.OutdoorAmbient = Color3.new (0,0,0)
wait(30)
end
-- 0.1 = 25 in the ambients
Thank you for any help!

4 comments
This website is not for giving people scripts, it is for helping people understand how to do something. You haven't explained anything at all.
My apologies. I added details on how the script operates and how it's an easier option. I'll be sure to explain things in future answers.
Sorry for the late response but thank you for the script! Although, I removed the two scripts I had and added this...but the sun isn't moving
CORRECTION: There was an error on line 17 but i managed to fix it - but the script only seems to make the day brighter, it doesnt get any darker during the night