Whats the most flexible way to shift time in a day/night cycle?

I’m working on a day/night cycle that takes lighting presets for specific times of day (dawn, morning, midday, dusk, night, midnight) and then interpolates the given values at predetermined times. Additionally, I want to have lighting presets for each specific type of weather (sunny, cloudy, rainy) and I want for the weather to interpolate between each other at set times. I’m using module scripts for the server to activate/deactivate the cycle and have the ability to set time, and I also want to send out remoteEvents to clients to get the right time and the current weather. What technique should I use to shift time that would give me the freedom to do all of these things? I’ve seen devs use wait loops to handle it but it seems really inflexible.


You could hook up a :GetPropertyChangedSignal to Lighting.Clocktime, but then you’d have to pull some shenanigans with os.time and whatnot.

I was thinking about doing something like that but it still seems clunky, because then im letting another script change the time and then changing the effects separately when they should happen together. For now I’m attempting to use coroutines to shift time and then yielding it whenever I want to update the speed.