Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make a respawn countdown gui?

Hello, i want to make a respawn countdown gui, but im new when it comes to scripting. I made this so far:


local rDelay = 5

function tp()
	txt = game.StarterGui.ScreenGui.TextLabel
	txt.TextTransparency = 0
	txt.TextStrokeTransparency = 0
	txt.Position = {0,0},{0,0}
	txt.Text = "Respawning in:"..tostring(rDelay)
	wait(5)
	txt.TextTransparency = 1
	txt.TextStrokeTransparency = 1
	txt.Position = {1,0},{1,0}
	target = Cframe.new(0,50,0)
	hoomanoid = character:FindFirstChild("Torso")
	hoomanoid.Cframe = target + Vector3.new(0,50,0)
end
local humanoid = character:FindFirstChild("Humanoid")
humanoid.Died:connect(tp)

1 answer

On 08, i reccomend something like this:

for i = 5,1,-5 do
txt.Text = "Respawning in:"..(1)
wait(1)

but then again, the fact that it's in starterGui might do something.

3 comments

0

Gonna check it, Thanks.

0

Doesn't work. Any other fixes?

0

clone txt into the playerGui instead of putting it in starterGui. i don't think you can change anything in startergui via scripts, but you can correct me if I'm wrong.

This discussion is preserved as it was. New answers, comments, and votes are closed.