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

Hey how do you make death/Game Over Gui?

hey guys I'm back! The one one and only Tizzel40 ! Im here to ask a question about "Game Over GUI's" so can any one tell me how to make one? For an example(the player dies and the gui pops up)And I want to know if this will work "IN GAME too" and plz tell me where to put it like "Starter gui etc..." ya know :) let me stop talking and get set some answerers from my fellow scripters :) xd

--Tizzel40 :D

4 comments

0

Did you even try?

0

nice wheres the SCRIPT :D

0

^ alie

0

Not a req site.

1 answer

Hi Tizzel,

What you're asking for is quite simple. You just need to make use of the Humanoid's .Died event. Upon this event, you just make a UI appear in the player's PlayerGui. So, to do this I will use the PlayerAdded event and the CharacterAdded event, and afterwards, I will attach a function to the Humanoids .Died event. Here, I will just demonstrate.

####ServerScript in ServerScriptService

local players = game:GetService("Players");

players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		local hum = char:WaitForChild("Humanoid");
		
		hum.Died:Connect(function()
			local gui = script:WaitForChild("Game Over Gui"):Clone();
			
			gui.Parent = plr:WaitForChild("PlayerGui");
		end)
	end)
end)

###In the above script, I assumed that the gui that you want the player to have upon death is under the script and that the script's a ServerScript under ServerScriptService.

##Well, hope I helped and have a nice day/night.

Thanks,

Best regards,

~~ KingLoneCat

3 comments

0

Why did you give him the code. That's not cool.

0

Now he's going to keep requesting more.. good job

0

... :(

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