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

How to hide own player name tag but other players still can see?

game.Players.ChildAdded:connect(function(player)
	player.CharacterAdded:connect(function(char)
		local plyrGui = Instance.new("BillboardGui")
		plyrGui.Parent = char.Head
		plyrGui.Adornee = char.Head
		plyrGui.Size = UDim2.new (1,0,1,0,0,0)
		plyrGui.StudsOffset = Vector3.new (0,2,0)
		
		game.Workspace:WaitForChild(player.Name):WaitForChild("Humanoid").DisplayDistanceType = "None"		

		local text = Instance.new("TextLabel")
		text.Parent = plyrGui
		text.Text = player.Name
		if not text.TextFits then
			text.TextScaled = true
		end
		text.Font = "SciFi"
		text.FontSize = "Size24"
		text.Size = UDim2.new (1,0,1,0,0,0)
		text.BackgroundTransparency = 1
		text.TextColor3 = BrickColor.new ("White").Color
		text.TextStrokeColor3 = BrickColor.new("Black").Color
		text.TextStrokeTransparency = 0
	end)
end)

1 answer

✓ Accepted answer

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.

plyrGui.PlayerToHideFrom = player

If this answered your question be sure to confirm it.

3 comments

0

yea that's the bestest

0

Thank you it works :) . I didn't realize that properties. Thanks again!

0

No problem!

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