Trying to create a day night cycle that loops through a week (Monday-Sunday)
So far got the day/night cycle up fine
local Lighting = game:GetService('Lighting')
local Morning, Night, Speed = 6 * 60, 18 * 60, 0.05
local Day = 'Mon'
local Days = {
'Mon', 'Tues', 'Wed', 'Thur', 'Fri', 'Sat', 'Sun'
}
while wait(0.1) do
Lighting:SetMinutesAfterMidnight(Lighting:GetMinutesAfterMidnight() + Speed)
end
And I’ve obviously got the Day, as well as all the shortened version of the days in a table. So my thought process was when it hit midnight, change the day to the next day in the Days table, so like
if Lighting:GetMinutesAfterMidnight() == 0 then
Day = Days[Day + 1]
end
I knew this would error out, but I’m not sure how to simply just get the next spot on the table?