New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How do I put a player name on a textLabel? [Solved]

Asked by 14 days ago
Edited by Feahren 14 days ago

I was trying to make a billboardgui that will say the players name. Everything went fine until I started to put the players name on the textLabel. Every time I tried something it would not work.

I don't know if i'm being dumb and the problem is right in my face, but I can't seem to figure out why it does not work.

(This is the code.)

game.Players.PlayerAdded:Connect(function(Plr)
    Plr.CharacterAdded:Connect(function(Char)
        plrNameUI:Clone().Parent = Char.Head
        plrNameUI.plrName.Text = Plr.Name
    end)
end)

(And This is the line i'm talking about.)

plrNameUI.plrName.Text = Plr.Name

I tried printing out the name and it worked perfectly fine. I also tried while in game to change it. it worked fine. I tried my hardest to find what the problem is, but can't. I hope I explained everything.

1 answer

Log in to vote
0
Answered by 14 days ago

I have found why it does not work.

The reason why is because the whole time I was changing the text in ServerStorage. Not The Players Head. Well their we go. I have fixed it my own. (sorry for making a post that was so easy why it was not working.)

0
oh i forgot. here is what i did to fix it. "Char.Head.plrNameUI.plrName.Text = Plr.Name" DevDukee 0 — 14d
0
oh lol Oblivious_Blitz 1 — 14d
Ad

Answer this question