How do i set my Surface gui text to the players name?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want my billboard’s text to be the players name.
  2. What is the issue? Include screenshots / videos if possible!
    I cannot find a way to do it.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Yes i looked for solutions on the Developer Hub and none worked
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
    image
    This is my setup
1 Like

Make a localscript in starterplayer and put this in, hope you tell me if this work !

local InstanceText --PATH
InstanceText.Text = game:GetService("Players").localplayer.Name

alright, ill be trying it, hope it works

Is the part parented to workspace? If so, the LocalScript won’t run. Your best bet is to put the local script somewhere like StarterPlayerScripts and tell the texttaleb to turn it’s text to LocalPlayer, like this:

--in starterplayer scripts
local text = workspace.part.SurfaceGui.TextLabel --make this your textlabel inside the part
local LocalPlayer = game:GetService("Players").LocalPlayer
text.Text = LocalPlayer.Name

Make sure for the InstanceText is a Instance and do not put the Instance.Text :+1:

Yeah, it is, and ill try this.

That the same of what i did :face_with_monocle: :rofl:

I put billboard gui and not surface gui, im gonna fix that really quick

Local Scripts only run in certain areas. I can’t list them off my brain right now, but you can read about them here. Local Scripts can be very helpful if used correctly.
LocalScript | Roblox Creator Documentation

-StarterPlayerScripts
-StarterChracterScripts
-ReplicatedFirst
-PlayerGui
-Workspace
-localplayer.character
-Backpack
:cool:

It worked! thank you so much! ive been trying to find a solution for 3 hours so thanks for helping :smile:

1 Like

Check the mark the close this post and help other to found the same solution, thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.