Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is the Fog End being set to 0 when I have it set to 150?

Asked by 3 years ago

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!

1
Did you go to Lighting and change the FogEnd property? Dovydas1118 1495 — 3y
0
No that's what the script is for. It worked earlier and then just broke SussiestBalss 40 — 3y

Answer this question