Well I am making a game, and I made a script for a cycle but I don't know how to make the night longer than the day in the game. I am trying to expand the time of the night and reduce the time of the day. I need help with it, please. I made a script for the cycle as well, but all the cycle has the same time for the day and the night and I do not know how to increase the time of the night.
COMMUNITY QUESTION
Is there a way to make the night longer than the day?
1 answer
Well, you could just do something like this!
local lighting = game:GetService("Lighting")--This just makes a variable for Lighting
while true do
lighting.ClockTime = lighting.ClockTime + 1--Increases the time
if lighting.ClockTime > 22 or lighting.ClockTime < 6 then--This if statement checks if it's night or day; before 6:00am and after 10:00pm
wait(2)--Amount of time for night before increasing time, noticably bigger!
else
wait(0.5)--Amount of time for day before increasing time
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
If you want to keep things simple, simply check if the time of the day is at the certain night time and increment the value, with a small value if the condition is true. I doubt it would look good but this is the simplest way to achieve it without a lot of work.
Thanks for your help, I made a cycle script but as I said I want to increase just the night and not the day. I can show the script: while wait(0.3) do game.Lighting:SetMinutesAfterMidnight(game.Lighting:GetMinutesAfterMidnight(7)+1) end
No. I meant that if the time of the night is, let's say, around 7:00 p.m, it is going to increment the time of the day by 0.5, as opposed to a typical 1. Once it reaches 7:00 a.m, it's going to revert back to the increment value of 1. Let me know if you need help making it!
What game is it your making?