So I wanted to add a Day/Night Cycle to my game, and I used a Script for it; problem is, it works, but works like real time, that means 1 game minute is 60 real life seconds.
I tried using Scripts from other people and such, but I still have the same problem.
Tween Lighting.ClockTime, each integer is 1 hour, meaning you have to tween it with the end goal being 24 for X seconds, X = the time for it to do a full day cycle in seconds
Game:GetService("TweenService"):Create(Game:GetService("Lighting"),TweenInfo.new(**time**,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,-1,true),{ClockTime=24}):Play() -- PLEASE NOTE: I DIDN'T TEST THIS SCRIPT
Hopefully I solved your problem, if I have make sure to let me know.
This is the most recent script I added. Copied it from Youtube because every other script I tried ended up with the same problem.
``lua
while wait(0.3) do
game.Lighting:SetMinutesAfterMidnight(game.Lighting:GetMinutesAfterMidnight()+100) – Change 1 to whatever you want. This is the increment of minutes every 0.3 seconds
local lighting = game:GetService("Lighting")
local run_service = game:GetService("RunService")
local increment = 0.0168 * 1 --change the 1 to how many minutes you want per second
run_service.Stepped:connect(function(up, dt)
lighting.ClockTime = lighting.ClockTime + (increment * dt)
end)