Welcome into the TimerEasy Forum.
Get the Model
Documentation and Source Code
Hello everyone.
This module has been created to use the timers more easier with some functions.
Installation
First, get the model from the Library.
After it, place the module in the ReplicatedStorage and in a script, get it.
local TimerEasy = require(game:GetService("ReplicatedStorage").TimerEasy)
Some examples
Simple timer system:
local TimerEasy = require(game:GetService("ReplicatedStorage").TimerEasy)
local myTimer = TimerEasy.new(60)
myTimer:Play()
myTimer.TimeChanged:Connect(function(newTime)
script.Parent.TextLabel.Text = "Time left: "..newTime
end)
If you want to use the second multiplier
local TimerEasy = require(game:GetService("ReplicatedStorage").TimerEasy)
local myTimer = TimerEasy.new(60)
myTimer:Play()
workspace.DetectPart.Touched:Connect(function(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) == game.Players.LocalPlayer then
myTimer:SetSecondMultiplier(2)
end
end)
myTimer.TimeChanged:Connect(function(newTime)
script.Parent.TextLabel.Text = "Time left: "..newTime.." (x"..myTimer.SecondMultiplier..")"
end)
If you want to make the timer more fast:
local TimerEasy = require(game:GetService("ReplicatedStorage").TimerEasy)
local myTimer = TimerEasy.new(60)
myTimer:Play()
myTimer:SetSpeedTime(0.5)
myTimer.TimeChanged:Connect(function(newTime)
script.Parent.TextLabel.Text = "Time left: "..newTime
end)
Check the documentation if you want to see more functions.
8 Likes
This looks beyond useful for me. I can’t wait to try it out to see if it works!
Edit: To the other’s in the thread: I’m just trying to congratulate the OP for trying to make this resource to benefit others even though it could be done easily.
Its the thought that counts
1 Like
I don’t want to be rude but this looks useless as you can do this:
local timevalue = 100
local speed = 0.5
local function onTimeChange()
print("Time changed to "..tostring(timevalue))
end
task.spawn(function()
while true do
timevalue -= 1;
task.wait((1 * speed))
end
end)
Using your own code for easy and not important things is way better than use third parties code.
3 Likes
Wolf1te
(Wolf1te)
February 26, 2022, 12:41am
#4
Would have more use if it counted in decimals, it’s more time consuming to install than to just script a timer.
while wait(1) do
if mapWaitTime > 0 then
mapWaitTime -=1
else
break
end
end
It has potential, just isn’t quite there yet.
2 Likes
this is just what I need for my game but what if you want to create a stopwatch and when the player dies for example the timer stops.
1 Like
This module has been made by me for the fun.
And this module is intended for beginners and people who use the timer a lot in different scripts
This module is intended for beginners and people who use the timer a lot in different scripts
regexman
(reg)
February 26, 2022, 6:34pm
#10
You can’t even edit the timer GUI? What’s stopping you from this.
local timer = 60 -- your time (default, minute.)
local speed = 5 -- ur speed
for i = 1,60 do
timer -= 1
task.wait(1*speed)
end
Most efficient code, but others code are great too.
2 Likes
I made this module to help beginners and for the fun, but u can use make with it yes
2 Likes
regexman
(reg)
February 27, 2022, 4:18pm
#12
You still shouldn’t depend on an 3rd party module that you can already make one yourself in 10 seconds.
1 Like