Hi my names is pixeluted and i want to do Night/Day my problem is the FogColor dont want change i using Tween Service Here is my script
local Light = game:GetService("Lighting")
local NightFogEnd = 75
local DayFogEnd = 150
local NightClockTime = 0
local DayClockTime = 12
local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(
2,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out
)
function SetDay()
local TweenFogDay = TweenService:Create(Light,Info,{FogEnd = DayFogEnd})
TweenFogDay:Play()
local TweenClockTime = TweenService:Create(Light,Info,{ClockTime = DayClockTime})
TweenClockTime:Play()
local TweenFogColorDay = TweenService:Create(Light,Info,{FogColor = Color3.fromRGB(192, 192, 192)})
TweenFogColorDay:Play()
end
function SetNight()
local TweenFogNight = TweenService:Create(Light,Info,{FogEnd = NightFogEnd})
TweenFogNight:Play()
local TweenClockTimeNight = TweenService:Create(Light,Info,{ClockTime = NightClockTime})
TweenClockTimeNight:Play()
local TweenFogColorNight = TweenService:Create(Light,Info,{FogColor = Color3.fromRGB(0,0,0)})
end
while wait() do
SetDay()
wait(10)
SetNight()
wait(10)
end
Thank for Reading