I'm trying to make an on death GUI and when I die it works fine, It says how much time you wait to spawn (5 seconds) but when it gets to 1 it waits a couple seconds more and then it disappears. I tried so many ways to change it and it doesn't work. Please help me, I would really appreciate it if you do.
Script 1:
game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Died:connect(function()
script.Parent.Visible = true
end)
Script 2:
while true do
wait(0.1)
if script.Parent.Parent.Visible == true then
script.Parent.Text = "Spawning you in: 5 Seconds."
wait(1)
script.Parent.Text = "Spawning you in: 4 Seconds."
wait(1)
script.Parent.Text = "Spawning you in: 3 Seconds."
wait(1)
script.Parent.Text = "Spawning you in: 2 Seconds."
wait(1)
script.Parent.Text = "Spawning you in: 1 Seconds."
while true do
wait(0.1)
if game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Health ~= 0 then
script.Parent.Parent.Visible = false
end
end
end
end
(The if part is kinda glitched)
Thanks, MajinBluee

5 comments
Try taking out the second while true do and see if that fixes it?
What do you mean by that?
http://wiki.roblox.com/index.php?title=API:Class/Player/LoadCharacter
Thanks bro!
To make this more compact, you might consider putting a for loop with a wait of 1 instead of manually putting 5 4 3 2 1. You can also customize how long it waits too.