If changing the ambient is your biggest concern, you can always make a loop script and check the time occasionally and set the settings. Here’s how I did for the game on my beach.
local TweenService = game:GetService("TweenService")
local CycleTime = 360
local RandomStartTime = math.random(0, 24)
game.Lighting.ClockTime = RandomStartTime
local LightGoal = {}
LightGoal.ClockTime = 24
local LightStyle = TweenInfo.new(CycleTime*(RandomStartTime/24), Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
TweenService:Create(game.Lighting, LightStyle, LightGoal):Play()
delay(0, function()
game.Lighting.ClockTime = 0
local LightGoal = {}
LightGoal.ClockTime = 24
local LightStyle = TweenInfo.new(CycleTime, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, -1)
TweenService:Create(game.Lighting, LightStyle, LightGoal):Play()
end)
local CurrentDayCycle = ""
while script do
if game.Lighting.ClockTime >= 0 and game.Lighting.ClockTime < 6 then
if CurrentDayCycle ~= "NightTime" then
local AmbientGoal = {}
AmbientGoal.FogColor = Color3.fromRGB(24, 42, 63)
AmbientGoal.FogEnd = 7000
AmbientGoal.FogStart = 50
AmbientGoal.OutdoorAmbient = Color3.fromRGB(107, 107, 107)
local AmbientStyle = TweenInfo.new(2.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
TweenService:Create(game.Lighting, AmbientStyle, AmbientGoal):Play()
end
CurrentDayCycle = "NightTime"
elseif game.Lighting.ClockTime >= 6 and game.Lighting.ClockTime < 6.25 then
if CurrentDayCycle ~= "SunRise" then
local AmbientGoal = {}
AmbientGoal.FogColor = Color3.fromRGB(146, 163, 114)
AmbientGoal.FogEnd = 7000
AmbientGoal.FogStart = 600
AmbientGoal.OutdoorAmbient = Color3.fromRGB(127, 127, 127)
local AmbientStyle = TweenInfo.new(2.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
TweenService:Create(game.Lighting, AmbientStyle, AmbientGoal):Play()
end
CurrentDayCycle = "SunRise"
elseif game.Lighting.ClockTime >= 6.25 and game.Lighting.ClockTime < 17.75 then
if CurrentDayCycle ~= "DayTime" then
local AmbientGoal = {}
AmbientGoal.FogColor = Color3.fromRGB(75, 129, 191)
AmbientGoal.FogEnd = 10000
AmbientGoal.FogStart = 1750
AmbientGoal.OutdoorAmbient = Color3.fromRGB(136, 136, 136)
local AmbientStyle = TweenInfo.new(2.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
TweenService:Create(game.Lighting, AmbientStyle, AmbientGoal):Play()
end
CurrentDayCycle = "DayTime"
elseif game.Lighting.ClockTime >= 17.75 and game.Lighting.ClockTime < 18 then
if CurrentDayCycle ~= "SunSetting" then
local AmbientGoal = {}
AmbientGoal.FogColor = Color3.fromRGB(146, 163, 114)
AmbientGoal.FogEnd = 7000
AmbientGoal.FogStart = 600
AmbientGoal.OutdoorAmbient = Color3.fromRGB(127, 127, 127)
local AmbientStyle = TweenInfo.new(2.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
TweenService:Create(game.Lighting, AmbientStyle, AmbientGoal):Play()
end
CurrentDayCycle = "SunSetting"
elseif game.Lighting.ClockTime >= 18 and game.Lighting.ClockTime <= 24 then
if CurrentDayCycle ~= "NightTime" then
local AmbientGoal = {}
AmbientGoal.FogColor = Color3.fromRGB(24, 42, 63)
AmbientGoal.FogEnd = 7000
AmbientGoal.FogStart = 50
AmbientGoal.OutdoorAmbient = Color3.fromRGB(107, 107, 107)
local AmbientStyle = TweenInfo.new(2.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
TweenService:Create(game.Lighting, AmbientStyle, AmbientGoal):Play()
end
CurrentDayCycle = "NightTime"
end
wait(2.25)
end
If the current ambient settings are off, you can always adjust it.
For doing weather, you can do what 3rdhoan123 and do a RNG for when rain happens or anything else, just make sure to add a cooldown and a bool value to make sure multiple weather effects don’t happen at the same time. Just make sure to adjust the lighting again if there’s certain weather effects. If you intend to add season-times like winter and summer, you will have to specific which season it is on and to determine which weather effects can be possible.