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

Follow up question on a script that if a player is killed it shows a GUi?

So this is a follow up. I'm trying to see if there is a way when a player dies it shows a GUI this is what I have so far~~~~~~~~~~~~~~~~~ local player = game.Players.LocalPlayer game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui') player.Character.Humanoid.Died:connect(function() player.PlayerGui.skipques.question.Visible = true end)


1 answer

Your code should be like this. Also, you need to put the script bellow into a Script in ServerScriptService

Code:

game:GetService('Players').PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		character:WaitForChild("Humanoid").Died:connect(function()
			player.PlayerGui:WaitForChild("skipques"):WaitForChild("question").Visible = true
		end)
	end)
end)

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