So I have asked this before, and the results were disappointing. I have screengui, with with a frame inside of it, inside that frame is the script, and a textlabel, inside the textlabel are 2 more textlabels(Not necessary for this question). I am trying to have the GUI say the players name the whole time they are on, and only they can see it. Well I have only gotten as far as..
function onPlayerEntered(player)
script.Parent.PName.Text = player.Name
end
game.Players.PlayerAdded:connect(onPlayerEntered)
Some have told me that I needed it to wait until the player was entered..
function onPlayerEntered(player)
repeat wait() until player.Character
script.Parent.PName.Text = player.name
end
game.Players.PlayerAdded:connect(onPlayerEntered)
Others have said that name is not a property of player..
function onPlayerEntered(player)
local name = player.Character.Name
repeat wait() until player.Character
script.Parent.PName.Text = name
end
game.Players.PlayerAdded:connect(onPlayerEntered)
I am so lost, because these all seem like valid reasons but they don't work..

3 comments
Could you give me an example? I but the last code in a local script and replaced the name line with the line you said. But is does not work?
You don't need it in a function.
Omg you are a genius. C;