I’m making a day and night cycle and I need the minutes to change every second. How can I do this?
Current Script:
local RunService = game:GetService("RunService")
local Lighting = game:GetService("Lighting")
local AdvanceDay = false
local CurrentDay = 1
RunService.Heartbeat:Connect(function(delta)
Lighting.ClockTime += delta * 0.035
if Lighting.ClockTime >= 0 and Lighting.ClockTime < 1 and AdvanceDay == false then
AdvanceDay = true
CurrentDay += 1
Lighting:SetAttribute("CurrentDay", CurrentDay)
end
if Lighting.ClockTime >= 1.5 and AdvanceDay == true then
AdvanceDay = false
end
end)