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) ~~~~~~~~~~~~~~~~~
Your code should be like this. Also, you need to put the script bellow into a Script
in ServerScriptService
Code:
1 | game:GetService( 'Players' ).PlayerAdded:connect( function (player) |
2 | player.CharacterAdded:connect( function (character) |
3 | character:WaitForChild( "Humanoid" ).Died:connect( function () |
4 | player.PlayerGui:WaitForChild( "skipques" ):WaitForChild( "question" ).Visible = true |
5 | end ) |
6 | end ) |
7 | end ) |