Hello developers! I have recently hit an issue when creating an update for a server. What I am trying to do is create a text label to when the player joins they see their name, and when the other player joins he sees his name. Or to simplify, this is what I am trying to make.
- 2 Players are in the server, Player A and Player B
- When Player A is playing his name is on the label
- When Player B is playing at the same time, Player B sees his name, Player B
Issue
Currently, I have the text label created, but the issue is getting it to work.
Tried Solutions
Currently, I have tried some other tutorials since I have never done this kind of work. I have this current script inside the label as a local script.
local player = game.Players.LocalPlayer
local name = player.Name
game.StarterGui.Playername.Plabel.Text = player.Name
I do not know if this is the right script or not, but so far it is not working. Here is a picture of the label, to show an example of what I have.
When the player joins, “Label” is replaced by his name.
Am I at least on the right track for my goal?