I’m tryna use TweenService to change the value of FogEnd so the fog comes in smoothly.
But the problem is that it doesn’t change the value of what I want it to. Instead, it changes it to 0.
The variable FogEndNew is a NumberValue and it does have value since it’s printed in the output.
Idk any solution to this for it should be working properly right?
Idk why it’s not working like it should work properly because the tween is working and the FogEndNew DOES have a value and its 500 but it still changes it to 0. E.E
local lighting = game.Lighting
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
5, --How much time the tween lasts
Enum.EasingStyle.Linear, --EasingStyle,
Enum.EasingDirection.Out, --EasingDirection,
0, --How many times it will repeat
false, --Reverses if true
0 --How much it gets delayed
)
local tweenFog = tweenService:Create(lighting, tweenInfo, {FogEnd = 100}) --The "100" is what you would like to set FogEnd to
tweenFog:Play()
I figured it out. It was because my FogEnd was set to 10000000 as its origin. Somehow the TweenService couldn’t get it to 500 fast enough since its such a high number so some errors were made I guess. Thanks a lot for those who tried to help man.