I have been working on a Day/Night cycle for my friends game. Its a realistic on though so it has more effects than just changing the time of day. It sets the flog closer and everything gets darker. I've been working on it be when I do, it lags like crazy! I'm really confused because it never did this before. Any idea on why?
COMMUNITY QUESTION
Whats happened to day/night cycle?
1 answer
Test this it wont lag and it is pretty good!
Time = game:service("Lighting")
while true do
wait(0.01)
Time:SetMinutesAfterMidnight(Time:GetMinutesAfterMidnight()+0.1)
end
Mark mine if it works!
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
And It might be because of a overload of lines if you doing it in a way of frames it could glitch it and you might need to add a denounce if not I really don't know but the script I used is simple its only just 4 lines.
this doesnt lag thanks!
this refreshes 100 times a second