This is a simple timer module that I think some people may find useful, If you happen to run into any bugs/errors let me know. Any suggestions are appreciated!
Usage:
TimeMe.new(Time, TextLabel, isReversed)
-- It can only go up by 1 second (as of yet)
-- isReversed means that the label will count 10/9/8 instead of 1/2/3
TimeMeObject:Clean()
-- When the timer finishes, it cleans itself up
-- Disconnects and removes required objects
TimeMeObject:Start()
-- This starts the timer
-- When it finishes, it fires the BindableEvent and the TimeMe object gets destroyed
My Example:
local TimeMe = require(game.ReplicatedStorage.TimeMe)
local TimeMeObject = TimeMe.new(10, script.Parent, true)
local TimerFinished = TimeMeObject.TimerFinishedEvent
TimeMeObject:Start()
TimerFinished.Event:Connect(function()
-- Timer Finished Code
end)
-- TimerFinishedEvent is a BindableEvent created when you create a TimeMe object.
You can get the module here