How would im make stop for my countdown?

here is a code :

local CurrectTime = nil
local FullTime = 0

local function startTimer(Time: number, call: any?)
	FullTime = Time
	
	spawn(function()
		for i=Time, 0, -1 do
			CurrectTime = i
			--print(i)
			
			if i==0 then
				if typeof(call) == 'function' then
					call()
				end
			end
			
			task.wait(1)
		end
	end)
end
local db = false
--code here
--db = true
-- if db == true then return end
 

this is not always suitable, I need to make it so that if another timer starts, the first one stops

why you ever need to go under 0?

I don’t know what you’re talking about, did i miss somthing?

just if count of timer thats you need appear use if timer == ? then continue end

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.