How to make death screen when the player dies!

How to make death screen when the player dies!

Click here to download the model!

1) Make a new ScreenGui inside StarterGui | game.StarterGui
image

2) Set IgnoreGuilnset to true (inside the ScreenGui we made)
It will make the GUI on all of our screen
image

3) Make a frame and design it
Set the size to: 1,0,1,0 and design it however you want

4) Make a TextLabel and name it "Timer"
image

5) Design it however you want

6) Make a new LocalScript inside the ScreenGui
image

7) Set the frame to invisible
image

8) Script it

local players = game:GetService("Players")
local localplayer = players.LocalPlayer
local char = localplayer.Character
local hum = char:WaitForChild("Humanoid")

local Frame = localplayer.PlayerGui:WaitForChild("DeathScreen"):FindFirstChild("DeathFrame") -- Make the "YourScreenGuiNameHere" to your ScreenGui name and the "YourFrameNameHere" to your Frame name 
local Timer = Frame:WaitForChild("Timer")

hum.Died:Connect(function() -- Detects when the player dies
	Frame.Visible = true -- Sets the Frame visible to true when the player dies
	for i = 5,0, -1 do -- Pairs loop countdown from 5 to 0
		wait(1)
		Timer.Text = "You will respawn in "..i -- Changing the text to the time that the player will respawn in
		if i == 0 then -- Checks if the countdown got to 0
			Frame.Visible = not Frame.Visible -- Sets the frame invisible
		end
	end
end)

9) Make sure to set the RespawnTime to the time you did in the timer

And you’re done!


Thanks for reading! - If you need any help feel free to reply

30 Likes

Looks Great! I can see horror games using this

Even though Im not using it, its still a great tutorial on a deathscreen

Nice work

6 Likes

Thanks for the help! I might use this in the future. Definitely gonna bookmark this hah

3 Likes

Nice, tutorial. Easy to follow! :smile:

4 Likes

Although for me it doesn’t matter, for less experienced scripters I recommend explaining the scripts

2 Likes

Well, he kind of did that exact thing, if you look in the script

1 Like

Comments weren’t there when I made that reply.

2 Likes

Great death screen, I might use this in my games

3 Likes

There was, you maybe didnt notice. I made these comments at the moment I made it :sweat_smile:

3 Likes

Hmm weird I even highlighted to make sure before I made that reply. Maybe the site glitched idk

2 Likes

Amazing. Just amazing. That’s the second tutorial that you made that I see, and it always help a lot.

This tutorial is great and very useful for beginners.