How to make a countdown timer that does a certain function after it becomes 0 in Roblox Studio
Описание
Hey! I hope you learned something new from this video!
In this video, we make a timer that does a function!
Music used:
Colbreakz - 30000
Follow my Twitter - https://twitter.com/Ironrxv
Scripts:
Script(TextLabel)(Main timer script):
local time = 15
for i = 1, 15 do -- change 15 to any number (time)
wait(1)
time = time - 1
script.Parent.Text = tostring(time)
end
-- functions
script.Parent.Text = "Time's up!"
wait(2)
game.ReplicatedStorage.Kicker:FireAllClients()
-- -- -- -- -- -- -- -- -- -- -- -- -- --
LocalScript(Kicker):
local Player = game.Players.LocalPlayer -- the player
game.ReplicatedStorage.Kicker.OnClientEvent:Connect(function(player)
Player:Kick("Time's up!") -- change the Time's up to your message
end)
----------------------------------------------------------------------------------------------------------------------
Have a nice day!!!!!!!!!!!
Рекомендуемые видео















![Сапольски про болезнь Альцгеймера и деменцию | Интервью отца и чада #26 [Robert Sapolsky]](/images/video/2026-04-28/01/22/012211c00a8b44fc4e7656e8741682ec.jpg?width=640)


