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

Hey how do you make death/Game Over Gui?

Asked by
Tizzel40 243 Moderation Voter
6 years ago

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

0
Did you even try? KawaiiX_Jimin 54 — 6y
0
nice wheres the SCRIPT :D awesomeipod 607 — 6y
0
^ alie Zafirua 1348 — 6y
0
Not a req site. kittonlover101 201 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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

0
Why did you give him the code. That's not cool. User#19524 175 — 6y
0
Now he's going to keep requesting more.. good job awesomeipod 607 — 6y
0
... :( Tizzel40 243 — 6y
Ad

Answer this question