Hello, I am making a day & night cycle and I want to create dynamic brightness for the game. I want the brightness to be effected by: cloud density, cloud cover, & in-game clock-time. This is what I have so far but this was really just test code.
local Clouds = workspace.Terrain:FindFirstChild("Clouds")
while true do
task.wait(.1)
local CloudsReflectance = (math.sqrt(Clouds.Cover) * math.sqrt(Clouds.Density)) % 20
local formula = CloudsReflectance
game.Lighting.Brightness = formula * game.Lighting.ClockTime
end