I understand that, I did read your original post. I’m saying that there could be something else causing this issue which wasn’t mentioned in the original post since I’m not having the same issue with the script as you are
There is no other script but this one, I opened another place to test it to avoid that issue, I checked and no, Nothing Stopping it on the Module Script, nor the Script requiring it
I’m not sure I understand. Why should it repeat? A tween only interpolates a number or a data type a single time unless specified, and then it will stop when it’s done interpolating. It won’t repeat assigning a value to a property until it’s exactly equal. So you will need to use either a loop or set the repeat count to -1 for it to repeat.
Yes, but that isn’t how it works. It doesn’t repeatedly assign a value to a property until the value of the property is exactly the same as the goal, it just interpolates a number (0) one single time to 25 and tries to apply it to the property. It doesn’t take into account the value of the property at any time except when the tween is first played.
function WeatherHandler:CreateDayCycle(
Time: number,
EasingStyle: Enum.EasingStyle,
EasingDirection: Enum.EasingDirection
)
local T = game.TweenService
game:GetService("RunService").Heartbeat:Connect(function()
T:Create(game.Lighting, TweenInfo.new(
math.clamp(Time, 1, 10), -- Me randomly playing with math LOL
EasingStyle,
EasingDirection,
--math.huge Useless
),
{ClockTime = 48}):Play()
if game.Lighting.ClockTime == 0 then
game.Lighting.ClockTime = 23.999
end
end)
end
Heya, I just so happened to check this website and saw @Developing_Scripter mention my resource. A better way to loop your tween would be by using Tween.Completed:Connect().