Hello.
I am trying to create a day cycle that includes realism like shown in the GIFs below:
https://gyazo.com/d8f9e2926651ce5c3b73a1e3282200c5
https://gyazo.com/541e2dffc5f2cc97bde69a0a4d3967db - In this one, I turn off the Global shadows at a later point than I should’ve, but the idea is the same.
I’m trying to use Brightness and GlobalShadows to achieve this. My idea for how this script will work is that at 1 point in game time (e.g, 16:00), the brightness of the game will slowly decrease from 2 by a certain number (e.g 0.4) each second passes (tick), until the brightness is 0. It would reverse when the sun rises, going from 0, to the brightness being 2. Global shadows will also turn off when it is 0.
I’ve done the time script, which is SetMinutesAfterMidnight, however would the function .time also work for this? So if time > 18:00 then e.c.t
My script follows as this:
BR = game.Lighting.Brightness – BR stands for Brightness
GShadows = game.Lighting.GlobalShadows – Global Shadowsl = game:service(“Lighting”)
while true do
l:SetMinutesAfterMidnight(l:GetMinutesAfterMidnight()+0.5)
wait(0.05)
end