game.Lighting:SetMinutesAfterMidnight(5 * 60)
What does it do? Why do I have to use : What does lighting do? What is SetMinutesAfterMidnight?
First of all, game.Lighting
is the Lighting service. It controls all the environmental lighting, which include the time of the day, brightness, colours of light and many other things.
The SetMinutesAfterMidnight
basically means the amount of minutes that have passed from midnight in the game. So you are changing the time here.
You need to use the :
because SetMinutesAfterMidnight
is not a property of Lighting
.
Alright, I agree with the answer above somewhat however, he did not cover everything. I will tell you what that script does.
:SetMinutesAfterMidnight()
which Roblox set for Lighting
goes to 0:00:00 in the TimeOfDay
property of Lighting
, and adds whatever you put in the parameter.game.Lighting:SetMinutesAfterMidnight(5*60);
TimeOfDay
property in Lighting
to go to 0:00:00 when it is set to midnight and they also made it to where it goes to the next hour auto-matically when you add 60 minutes to the hour. So when you multiply 60 by 5 it makes it 5 o'clock.Here is where you can learn more about Lighting
and it's functions.
Here is where you can learn more about the :SetMinutesAfterMidnight()
function of Lighting
.
~~ KingLoneCat