Player Resetting Countdown
In games such as “Emergency Response: Liberty County” when you try to reset, there will be a overhead GUI with a 5 second countdown until you reset.
How would I make a Resetting Countdown?
Player Resetting Countdown
In games such as “Emergency Response: Liberty County” when you try to reset, there will be a overhead GUI with a 5 second countdown until you reset.
How would I make a Resetting Countdown?
Explorer:
Script:
local TweenService = game:GetService("TweenService")
local Players = game:GetService("Players")
local RespawnOverhead = game.ServerStorage.RespawnOverhead
Players.CharacterAutoLoads = false
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid", math.huge) -- loading problems
Humanoid.Died:Once(function()
local OverHead = RespawnOverhead:Clone()
OverHead.Parent = Character.HumanoidRootPart
for i=5, 1, -1 do
OverHead.Timer.Text = i
task.wait(1)
end
OverHead.Enabled = false
task.wait(0.5)
Player:LoadCharacter()
end)
end)
Player:LoadCharacter()
end)
Thank you so much.
ignore this
for i=Players.RespawnTime, 1, -1 do
OverHead.Timer.Text = i
task.wait(1)
end
The default respawn time is five seconds but it might be changed.