Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Lighting time of day lerp?

How could i lerp time of day? answer?

1 answer

✓ Accepted answer

You are able to use TweenService to tween the ClockTime, resulting in a smooth transition. For example:

local TS = game:GetService("TweenService")
local CycleLength = 50
local Info = TweenIngo.new(CycleLength, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, -1) -- negative 1 means it will infinitely repeat
local Goal = {ClockTime = 24}
local Tween = TS:Create(game.Lighting,Info,Goal)
Tween:Play()

This should make a smooth day/night cycle that lasts 50 seconds before repeating. More info on how TweenService works can be found here.

Hope this helps!

1 comment

0

honestly that is spoon feeding

This discussion is preserved as it was. New answers, comments, and votes are closed.