How do i make timer to halloween?

  1. What do you want to achieve? Keep it simple and clear!
    Hello! I wanna make timer to helloween(ETS time), but stuck because i didn’t made timers before
  2. What is the issue? Include screenshots / videos if possible!
    i have no idea how to do that
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tryed to add loops in which text changes, but i don’t know how to stop loop when time will be 0 0 0
    My code:
local Timer = script.Parent
local TimeinSeconds = 327600
local TimeInMinutes = 5460
local TimeInHours = 91
local TimeInDays = 3

repeat --im stuck there

Okay nevermind i got how to do that by youtube, solved

For anyone else who wants a solution to this problem:

  1. When is Halloween in UNIX timestamp? (You can look this up on Google): 1635634800
  2. What time is it now in UNIX timestamp? (Find using os.time() - currently: 1635329915)
local HalloweenTime = 1635634800

while task.wait(1) do
	print(HalloweenTime - os.time() .. " seconds remaining!")
end

Oh yeah a working script to halloween timer:

local timer = script.Parent
local day = os.time({year = 2021, month = 10, day = 31, hour = 20, min = 0, sec = 0 })

while wait() do
	
	local secondsBetween = os.difftime(day, 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 = "Event Starts In:"..days.."days:"..hours.."hours:"..minutes.."mins:"..seconds.."secs."
	timer.Text = textString
	
	if secondsBetween <= 0 then break end
end