Город МОСКОВСКИЙ
00:02:59

How to make a countdown timer that does a certain function after it becomes 0 in Roblox Studio

Аватар
Секреты Гейминга
Просмотры:
81
Дата загрузки:
30.10.2023 10:21
Длительность:
00:02:59
Категория:
Видеоигры

Описание

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!!!!!!!!!!!

Рекомендуемые видео