local TimeInMinutes = 0 while true do wait(1) game.Lighting:SetMinutesAfterMidnight(1 * TimeInMinutes) TimeInMinutes = TimeInMinutes + 1 if TimeInMinutes >= 1440 then TimeInMinutes = 0 game.Workspace.TimeInMinutes.Value = game.Workspace.TimeInMinutes.Value + 1 if game.Workspace.TimeInMinutes.Value >= 1440 then game.Workspace.TimeInMinutes.Value = 0 end end end
I'm trying to make a tracker using a NumberValue in workspace, but the game doesn't change the actual value, and I have no clue why. The Time of day changes flawlessly.
local TimeInMinutes = 0 while true do wait(1) game.Lighting:SetMinutesAfterMidnight(1 * TimeInMinutes) TimeInMinutes = TimeInMinutes + 1 if TimeInMinutes >= 1440 then TimeInMinutes = 0 end game.Workspace.TimeInMinutes.Value = game.Workspace.TimeInMinutes.Value + 1 if game.Workspace.TimeInMinutes.Value >= 1440 then game.Workspace.TimeInMinutes.Value = 0 end end
I had my ends wrong so it kept waiting for TimeInMinutes to be greater than 1440 before it'd continue with the script.