I am making a day and night cycle, and it keeps setting the Fog End to 0. Any ideas why?
CODE:
local dayTimeGoal1 = {FogEnd = 150; ClockTime = 11}
local dayTimeGoal2 = {Brightness = 1.5}
local nightTimeGoal1 = {FogEnd = 35; ClockTime = 0}
local nightTimeGoal2 = {Brightness = 0}
local tweenInfo1 = TweenInfo.new(7.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local tweenInfo2 = TweenInfo.new(15, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local function onDayEnd()
local lighting = game:GetService("Lighting")
local tweenService = game:GetService("TweenService")
tweenService:Create(lighting, tweenInfo1, nightTimeGoal1):Play()
tweenService:Create(lighting, tweenInfo2, nightTimeGoal2):Play()
end
local function onNightEnd()
local lighting = game:GetService("Lighting")
local tweenService = game:GetService("TweenService")
tweenService:Create(lighting, tweenInfo1, dayTimeGoal1):Play()
tweenService:Create(lighting, tweenInfo2, dayTimeGoal2):Play()
end
Any help is appreciated. Thanks!

2 comments
Did you go to Lighting and change the FogEnd property?
No that's what the script is for. It worked earlier and then just broke