Issue with countdown

local NewYear = (os.time() + 10) -- New Year Time In Epoch

local TimeToClaimTitle = 1704178800

local Countdown = workspace:WaitForChild("NewYearCountdown")

local function UpdateCountdown(TimeRemaining)
	
	Countdown.UI.Status.Text = ("%i:%02i:%02i:%02i"):format(TimeRemaining/60^2/24, TimeRemaining/60^2, TimeRemaining/60%60, TimeRemaining%60)
	
end

local GloballyAnnounceNewYear = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvents").GloballyAnnounceNewYear

local MessagingService = game:GetService("MessagingService")

MessagingService:SubscribeAsync("GloballyAnnounceNewYear",function()
	
	GloballyAnnounceNewYear:FireAllClients()
	
	print("Announced " .. tonumber(os.date("%Y")) .. " globally.")
	
end)

while true do
	
	local CurrentTime = os.time()
	
	if CurrentTime < NewYear then
		
		local TimeDifference = NewYear - CurrentTime
		
		UpdateCountdown(TimeDifference)
		
	else
		
		MessagingService:PublishAsync("GloballyAnnounceNewYear")
		
	end
	
	task.wait(1)
	
end

I want to remove the days counter once the counter is under 1 day or 24hrs

In order to remove the days counter once the counter is under 1 day or 24 hours, you can add an if condition within the UpdateCountdown function that checks if the time remaining is less than one day. If it is less than one day, then you can exclude the day counter from the string format.

local function UpdateCountdown(TimeRemaining)
    if TimeRemaining < 60^2*24 then
        Countdown.UI.Status.Text = ("%02i:%02i:%02i"):format(TimeRemaining/60^2, TimeRemaining/60%60, TimeRemaining%60)
    else
        Countdown.UI.Status.Text = ("%i:%02i:%02i:%02i"):format(TimeRemaining/60^2/24, TimeRemaining/60^2, TimeRemaining/60%60, TimeRemaining%60)
    end
end