I’m currently attempting to make custom display names, but the names would only be seen through the server, while the client sees no names at all. Any advice would be most appreciated.
--server
game:GetService("Players").PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
game:GetService("RunService").Stepped:wait()
setupNames(char)
end)
end)
--echoreaper's example that i'm using
function setupNames(char)
local oldHead = char.Head
local newHead = oldHead:Clone()
local weld = Instance.new("Weld", newHead)
weld.Part0 = oldHead
weld.Part1 = newHead
oldHead.Transparency = 1
newHead.Transparency = 0
local dummyModel = Instance.new("Model")
local dummyHumanoid = char.Humanoid:Clone()
char.Humanoid.NameDisplayDistance = 0
dummyModel.Name = "test"
dummyHumanoid.Parent = dummyModel
newHead.Parent = dummyModel
dummyModel.Parent = char
end
Make sure to read the Humanoid API reference page, because it has descriptions on these properties and how they affect characters. NameDisplayDistance affects the visibility of your name to others, as well as how far you can see another Humanoid’s name. Also be sure to check out DisplayDistanceType - specifically Viewer, which the Humanoid is set to.
Non-problem. The dummy model is being treated as a whole new assembly. Cloned and parented parts have no bearing on this.
That’s a description of the problem they’re facing, not what they’re trying to achieve. OP is trying to make custom name displays but they’re only seeing names via the server tab and not the client tab. The issue is not that names aren’t replicating, it’s that a property was wrongly used.
Using billboard guis instead can make it look identical and it will also look a lot nicer and have more options in appearance
local Replicated_Storage = game:GetService("ReplicatedStorage")
local BillBoard = Replicated_Storage:WaitForChild("BillboardGui") -- the BillBoard gui we will be using (file included)
function EquipBillboard(Character)
local HumanoidRoot = Character.HumanoidRootPart
Character.Humanoid.NameDisplayDistance = 0
local BillBoardClone = BillBoard:Clone() -- clones the BillBoard
BillBoardClone.NameText.Text = Character.Name -- sets the BillBoard's TextLabel's Text to the Character's name
BillBoardClone.ExtentsOffsetWorldSpace = Vector3.new(0, 3.5, 0) -- moves the billboard gui upward so the name appears above the Character
BillBoardClone.Parent = HumanoidRoot -- parents it to the characters humanoidrootpart
-- using humanoidrootpart for the billboard gui is prefered as it will not wobble when a player walks
end
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(EquipBillboard) -- equips the billboard gui whenever they spawn/respawn
end)
you can tweak with the billboard gui to make it look more like default, or you could change it up