local gui= game.StarterGui.plrdiedgui.Frame
game:GetService('Players').PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
wait(0.3)
local Textlabel = Instance.new("TextLabel")
Textlabel.Parent = gui
Textlabel.Position = UDim2.new(0.5, -100,0.5, -125)
Textlabel.Size = UDim2.new(0, 200,0, 50)
Textlabel.BackgroundColor3 = BrickColor.White().Color
Textlabel.BackgroundTransparency = 1
Textlabel.Text = plr.Name .. tostring(" just died!")
wait(5)
Textlabel:remove()
end)
end)
This script fails to display this GUI to me until I've respawned, and when the Textlabel is removed, I still see the TextLabel. How do I overcome this?

5 comments
Thank you, PlayerGUI isn't a server is it?
service***
It is not, no
Would it be fine to create the GUI then parent it to plr.PlayerGUI.ScreenGui.Frame
Yes, assuming ScreenGui -> Frame already exists.