I wrote a day/night script and it changes really quick, how do I make each day last longer?
game.Lighting:SetMinutesAfterMidnight(5 * 60) wait(1) game.Lighting:SetMinutesAfterMidnight(6 * 60) wait(1) game.Lighting:SetMinutesAfterMidnight(7 * 60) wait(1) game.Lighting:SetMinutesAfterMidnight(8 * 60) wait(1) game.Lighting:SetMinutesAfterMidnight(9 * 60) minutesAfterMidnight = 0 while true do minutesAfterMidnight = minutesAfterMidnight + 1 game.Lighting:SetMinutesAfterMidnight(minutesAfterMidnight) wait(.1) end
Much like Fearme987 said, just change the number inside the parenthesis after "wait"
Example: Wait(60)
That will make it wait 60 seconds before actually changing the time of day, I also suggest checking out the wiki page below on how to create a day/night script. It shows you how to loop it, make it shorter, and even make things happen at certain times of day!
http://wiki.roblox.com/index.php?title=Making_a_Day/Night_Cycle
Or you could if u wanna go by hour then do this
minutesAfterMidnight = 0 while true do minutesAfterMidnight = minutesAfterMidnight + 60 game.Lighting:SetMinutesAfterMidnight(minutesAfterMidnight) wait(60) -- Where 1 hour(in game) = 1 minute(real life) end
if you want time to change every minute then do this
minutesAfterMidnight = 0 while true do minutesAfterMidnight = minutesAfterMidnight + 1 game.Lighting:SetMinutesAfterMidnight(minutesAfterMidnight) wait(1) -- Where 1 minute (in game) = 1 second (real life) end