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

Player Names on Surface gui texts?

I'm making a Surface Gui text on a block and I want the text to say the players name on their screen?

Like Ex: CaptainRoblox joins the game the text will say "Welcome CaptainRoblox" only on that players screen

3 answers

The easiest way to do this is to put the SurfaceGui into StarterGui and set the Adornee property of the screengui to the part you would like it shown on. This way the whole screen gui is for that player so you can use localscripts in it and it will know who the local player is. This will also allow the player to change buttons (if there are any) on their GUI but not on everyone else's.

Hope this helped. If it did please accept this as the answer. If it didn't help or you find it confusing please feel free to message me and ask for help.

2 comments

0

How do I set the Adornee to a certain part it shows an X for me?

0

Click to the left of the X

I think the easiest way is to turn FilteringEnabled on and have a local script change the Surface Gui's text. The text should change on the player locally so it shouldn't change for other players.

1 comment

0

It's not wrong, but it's not the right way to do it. Regardless, I don't see why people would give you -1 for a 'correct' answer.

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