I have a day/night script, but I was wondering if there's a way to change the Lighting with the time of day to make it gradually darker at night, and then lighter in the day. Is such a thing possible?
Here's my day/night script.
while wait (.5) do game.lighting:SetMinutesAfterMidnight(game.lighting:GetMinutesAfterMidnight() +1) end
Another way to change the brightness of your place is by inserting a ColorCorrectionEffect into Lighting and adjusting the settings there. You can change the Brightness, Contrast, Saturation, and TintColor with ColorCorrection to affect how your game looks.
while wait (.5) do game.Lighting:SetMinutesAfterMidnight(game.Lighting:GetMinutesAfterMidnight() +1) if game.Lighting.TimeOfDay == "18:00:00" then colorCorrection = Instance.new("ColorCorrectionEffect") colorCorrection.Parent = game.Lighting colorCorrection.Brightness = 0.5 end if game.Lighting.TimeOfDay == "06:00:00" then colorCorrection.Brightness = 0 end end
You can change the Ambient, OutdoorAmbient, and Brightness to alter how "dark" or "light" a place looks.
game.Lighting.Brightness = 0.25 game.Lighting.Ambient = Color3.new(0,0,0) game.Lighting.OutdoorAmbient = Color3.new(0,0,0)
You would, of course, have to alter around these values to allow them to fit with your script.