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

How do I make a gui re appear after player died?

Asked by 6 years ago

So i have a figthing game with a gui class selection screen, the gui appears when a player connects but when a player dies, the gui wont appear again. How do I make it appear? My current code:


Menu = script.Menu game.Players.PlayerAdded:connect(function(player) local MenuClone = Menu:Clone() MenuClone.Parent = player.PlayerGui end)

Menu is the name of the ScreenGui.

0
Place it in StarterGui? awesomeipod 607 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
local Menu = script.Menu

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function()
        local MenuClone = Menu:Clone()
        MenuClone.Parent = player.PlayerGui
    end)
end)
0
.CharacterAdded event triggers whenever the player respawns Le_Teapots 913 — 6y
Ad

Answer this question