I am trying to make a day/night script but also utilize values to change the day from Sunday, to Monday, and so on, but for some reason, the value won't change and I'm not receiving any errors.
local lighting = game:GetService("Lighting")
local replicatedStorage = game:GetService("ReplicatedStorage")
local event = replicatedStorage:findFirstChild("Time")
while wait(.9) do
local hours = math.floor(lighting:GetMinutesAfterMidnight() / 60)
local suffix = "AM"
local minutes = lighting:GetMinutesAfterMidnight() - (hours * 60)
if hours > 11 then
hours = hours - 12
suffix = "PM"
end
if hours == 0 then
hours = 12
end
if minutes < 10 then
minutes = "0" .. minutes
end
local text = hours .. ":" .. minutes .. " " .. suffix
event:FireAllClients(text)
lighting:SetMinutesAfterMidnight(lighting:GetMinutesAfterMidnight() + 1)
end
if game.Lighting.ClockTime == 0.00 or 00 or 0 then
local value = game.Lighting.DotW
for i = 1,1 do
value.Value = value.Value + 1
end
end
