TimeMe - A simple timer module

timeme

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

3 Likes

I advise swapping to an purely lua based event system

1 Like

Good module! However, i recommend if there is any security in the events, and add if it reverses.

2 Likes

Why would you talk about security in this system?

1 Like

People can sometimes (hackers) randomly fire events.

1 Like

its not using remote events???

3 Likes

when formatting make sure to put a [details=β€œβ€] and a [/details] at the bottom.

Like HTML, don’t forget the first one.

1 Like