Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Whats happened to day/night cycle?

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?

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!

3 comments

0

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.

0

this doesnt lag thanks!

0

this refreshes 100 times a second

This discussion is preserved as it was. New answers, comments, and votes are closed.