How to make a Weekly Countdown

Hey, I have game where an event takes place every Wednesday and Saturday at a certain time, and I am currently trying to make a countdown until the event begins.

I have some experience with scripting, but I have never tried making a countdown of this complexity.
This sciript is from the YouTuber, HowToRoblox, and I was wondering how I would be able to make the script I mentioned.

local day1 = os.time({year = 2021, month = 9, day = 5, hour = 6, min = 0, sec = 0})

while wait() do
	local secondsBetween = os.difftime(day1, os.time())
	local seconds = secondsBetween % 60
	local minutes = math.floor(secondsBetween % (60*60) / 60)
	local hours = math.floor(secondsBetween % (60*60*24) / (60*60))
	local days = math.floor(secondsBetween % (60*60*24*30) / (60*60*24))

	local textString = days .. "d:" .. hours .. "h:" .. minutes .. "m:" .. seconds .. "s"
	print(textString)

	if secondsBetween <= 0 then break end
end

Any helps as to how to achieve this is appreciated. Thanks for reading. :smiley:

Hey there! :wave:

I believe you can just replace the date with the date you’d like to set it to and add your event code inside of the if statement in your loop.

Hope this helps! :grinning_face_with_smiling_eyes:

You can try use messaging service to deliver data throughout all the servers.