Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a GUi that comes up when the player dies?

Asked by 10 years ago

How to make a GUi that comes up when the player dies? Exp: they get killed by sword or gun when the die a gui will show up saying you died than fades out

2 answers

Log in to vote
0
Answered by
Lacryma 548 Moderation Voter
10 years ago

You'll have to do the fade thing yourself

Gui = nil --Set the gui

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
char.Humanoid.Died:connect(function()
Gui:Clone().Parent = plr:WaitForChild("PlayerGui")
end)
end)
end)
Ad
Log in to vote
0
Answered by
RM0d 305 Moderation Voter
10 years ago
game.Players.PlayerAdded:connect(function(Player) -- when player joins
Player.CharacterAdded:connect(function(character) -- when there character gets added
character.Humanoid.Died:connect(function() -- When they die
gooey = script.DeathGui:Clone() -- CLones the gui
gooey.Parent = Player.PlayerGui -- Parents the gui to the player so they can see it.
wait(1) -- waits 1 second 
for i = 0,1,0.1 do 
 gooey.Frame.BackgroundTransparency = i -- Sets the transparency of frame to 1 over time
wait(0.05)
end

script goes in workspace...

IF i helped upvote me... Any problems Comment below

Answer this question