hello robloxians,
so i just made a tween lighting changing and i wonder how can i make the lighting change only one time.
example: https://gyazo.com/bee439926813476eaaa1c76079775492
here is my code:
local hum = script.Parent
local TweenService = game:GetService("TweenService")
local Lighting = game.Lighting
local Info = TweenInfo.new(3, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, true, 0)
local Night = {
ClockTime = 18.5;
};
local Day = {
ClockTime = 14;
};
local tween = TweenService:Create(Lighting,Info,Day)
local tween2 = TweenService:Create(Lighting,Info,Night)
while wait() do
if hum.HumanoidRootPart.Position.Y >= 10 then
tween:Play()
tween:Pause()
else
tween2:Play()
tween:Pause()
end
end
thanks for help,
REALINONOOBYT.