In the end, I found 2 solutions to this problem.
Solution 1:
Just change the ClockTime and GeographicLatitude manually without using any plugins. It will take time, but it won’t cause problems with negative ClockTime. I used this solution because it’s easier and the second solution is unstable.
Solution 2 (kinda whack):
Create a proxy number value and then change the TimeOfDay according to the proxy value.
I’ve seen a way to convert TimeOfDay to ClockTime on this post but other than that, other solutions is to tween the ClockTime rather than TimeOfDay, which isn’t what I need.
I made a mistake about this conversion. It isn’t TimeOfDay to ClockTime, rather the opposite way around. I figured out the conversion myself though, and here is the function:
local function CTtoTOD(ct)
local H = math.floor(ct)
local M = (ct-H) * 60
local S = (M-math.floor(M)) * 60
return string.format("%02i:%02i:%02i",H,M,S)
end
This solution is a whacky one because somehow the sun will go crazy when you constantly change to a negative ClockTime. You’ll see why when you test it yourself. And it’ll sometimes overshoot the target value even though the tween style isn’t Elastic.
But anyways here is the code I wrote to tween negative ClockTime.
local function CTtoTOD(ct)
local H = math.floor(ct)
local M = (ct-H) * 60
local S = (M-math.floor(M)) * 60
return string.format("%02i:%02i:%02i",H,M,S)
end
local clockTimeProxy = Instance.new("NumberValue")
clockTimeProxy.Changed:Connect(function(val)
game.Lighting.TimeOfDay = CTtoTOD(val)
end)
clockTimeProxy.Value = game.Lighting.ClockTime
game:GetService("TweenService"):Create(
clockTimeProxy,
TweenInfo.new(5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut),
{Value = -9}
):Play()
This is my first post, hope this helps people in the future!