My script won't add one to an IntValue, how can I fix it?
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.
01 | local lighting = game:GetService( "Lighting" ) |
02 | local replicatedStorage = game:GetService( "ReplicatedStorage" ) |
03 | local event = replicatedStorage:findFirstChild( "Time" ) |
06 | local hours = math.floor(lighting:GetMinutesAfterMidnight() / 60 ) |
08 | local minutes = lighting:GetMinutesAfterMidnight() - (hours * 60 ) |
19 | minutes = "0" .. minutes |
22 | local text = hours .. ":" .. minutes .. " " .. suffix |
23 | event:FireAllClients(text) |
24 | lighting:SetMinutesAfterMidnight(lighting:GetMinutesAfterMidnight() + 1 ) |
27 | if game.Lighting.ClockTime = = 0.00 or 00 or 0 then |
28 | local value = game.Lighting.DotW |
30 | value.Value = value.Value + 1 |