Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make day to night?

Asked by 9 years ago

Ok. so how do i make it where the script makes time go like a clock. for instance

00:00:00-> 01:00:00-> 02:00:00->03:00:00 and so forth

also. i would like to make day long. and night. so what should i edit in the 00{00;00} part

im clueless. where should i put the script. and what should the script BE??

any answer would be great. just help me on this.

1 answer

Log in to vote
0
Answered by 9 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.

l = game:service("Lighting") gets the lighting service

and

while true do wait(0.1) l:SetMinutesAfterMidnight(l:GetMinutesAfterMidnight()+1)

end

makes it so it loops adding minutes to the time

l = game:service("Lighting") 
while true do 
    wait(0.1)
l:SetMinutesAfterMidnight(l:GetMinutesAfterMidnight()+1)

end
Ad

Answer this question