01 | game.Players.ChildAdded:connect( function (player) |
02 | player.CharacterAdded:connect( function (char) |
03 | local plyrGui = Instance.new( "BillboardGui" ) |
04 | plyrGui.Parent = char.Head |
05 | plyrGui.Adornee = char.Head |
06 | plyrGui.Size = UDim 2. new ( 1 , 0 , 1 , 0 , 0 , 0 ) |
07 | plyrGui.StudsOffset = Vector 3. new ( 0 , 2 , 0 ) |
08 |
09 | game.Workspace:WaitForChild(player.Name):WaitForChild( "Humanoid" ).DisplayDistanceType = "None" |
10 |
11 | local text = Instance.new( "TextLabel" ) |
12 | text.Parent = plyrGui |
13 | text.Text = player.Name |
14 | if not text.TextFits then |
15 | text.TextScaled = true |
There is a property in the billboard gui called "PlayerToHideFrom". It is an object value. You set this value to the player and the player will notsee their own name tag while other people do.
1 | plyrGui.PlayerToHideFrom = player |
If this answered your question be sure to confirm it.