Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make a players username show on a gui?

I made a GUI that covers the whole screen and i want it to say Hello (Player username here), but I don't know how to I've searched on the internet on how to do it but, I still can't find how to do it pls help.

2 answers

✓ Accepted answer

You get the name of the LocalPlayer, then add that to your GUI's text

Example:

local label = script.Parent
local player = game.Players.LocalPlayer

label.Text = "Hello, "..player.Name

2 comments

0

When i did i got this error Players.BlueFlash2020.PlayerGui.Message.TextLabel.LocalScript:6: attempt to call field 'Name' (a string value)

1

Nevermind i fixed thx for the help

try this add a LOCAL script into the text label then write this script.Parent.Text = "write something here " .. game.Players.localPlayer.Name .. "write something here if you want"

This discussion is preserved as it was. New answers, comments, and votes are closed.