So the script below hides the player's name.. However i have some NPC/Parts with Humanoids that get their name hidden aswell....I only want to hide it for the players, what should i do?

local billboardgui = game:GetService("ServerStorage"):WaitForChild("GUIs"):WaitForChild("PlayerNameGui")


game.Players.PlayerAdded:connect(function(plr)
	plr.CharacterAdded:connect(function(char)
		
		char.Humanoid.NameDisplayDistance = 0
		
		local clonedgui = billboardgui:Clone()
		clonedgui.Parent = game.Workspace:WaitForChild(plr.Name).Head
		clonedgui.TextLabel.Text = plr.Name
	end)
end)

5 comments

0

I'm going to tell you right now that that is already only going to affect players, not NPCs.

0

Nope, this script does something to the parts with humanoid...apparently the Humanoid still has the normal displaydistance but it simply doesn't show the name. Any ideas?

0

Hmm...It seems NameDisplayDistance affects the player but makes him unable to see any other humanoids names..Is there any other way to hide the player's name?

0

set display distance type to None

0

Thanks Luka, Working well now! I just changed Player's DistanceType to None and made the distance back to the normal value.