game.Players.PlayerAdded:Connect(function(plr) local gui = plr.PlayerGui plr.CharacterAdded:connect(function(char) char:WaitForChild("Humanoid").died:Connect(function() print(plr.Name.." / Dead : true") game.workspace.DiedSound:Play() gui.DeadScreen.TextDead.Visible = true -- the problem is here end) end) end)
when i try and i kill my character the output say that DeadScreen is not a valid member of PlayerGui
plr.PlayerGui.DeadScreen.TextDead.Visible = true
or
gui:FindFirstChild("DeadScreen").TextDead.Visible = true