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

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

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.

1 comment

0

Place it in StarterGui?

1 answer

✓ Accepted answer
local Menu = script.Menu

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

1 comment

0

.CharacterAdded event triggers whenever the player respawns

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