Are Humanoid nametags baked into the engine?

I was wondering if anyone knows if the Humanoid’s nametags are baked into the Humanoid object or if they’re created by a script and where said script is located. I’d like to add some of my own touches to it, such as recolouring the bar or adding more bars for extended indicators.

I’ve spent a number of weeks going over Roblox CoreScripts and doing play tests with all objects visible, but I haven’t been able to find any BillboardGui objects related to the Humanoid’s nametags, let alone any code responsible for managing them.

I don’t know how I would go about recreating the name tags myself especially if I don’t have an active reference to go off of, but I will try if that’s the only other option I’ve got.

I know it’s possible to retrieve the Humanoid’s nametag or recreate it such that you can’t tell if it’s a custom implementation or the Humanoid default because a game, The Final Stand 2, does exactly this. The nametag looks exactly like the default but has the option of a second bar.

For reference, this is a nametag:
image

3 Likes

you could use a billboard GUI along with RenderStepped

local name = game.ReplicatedStorage:WaitForChild("DisplayName"):Clone()
name.CFrame = character.Head.CFrame + character.Head.CFrame.upVector*2
name.Parent = character.Head

game:GetService("RunService").RenderStepped:Connect(function()
	
	name.CFrame = character.Head.CFrame + character.Head.CFrame.upVector*2

end)

https://gyazo.com/388120253095cfa14c18eb9a7e2087ef

you would have to replicate this to every player using the server and then locally set the labels’ visibility for each player based on who should see it.

This has nothing to do with what I’m asking. In addition, I can avoid using RenderStepped by just adorning it to the character’s head if I were to remake the current nametags myself. The implementation has extraneous work.

If my wording confused you, by “I don’t know how I would go about recreating the nametags”, I am referring to the more fine-print content such as the image assets, positions, sizing and so on, not the actual presence of the BillboardGui. I know how to do that much.

2 Likes

I’m pretty sure it’s internally rendered.

The game you referenced definitely uses its own recreation of the Humanoid nametag. I wouldn’t, however, say it’s exactly like the default. If you look closely, there’s a subtle difference between that and the default one: the one in the game is more rectangular, whereas the default one is more elliptical:

Also, there aren’t any traces of the Humanoid nametag in Roblox’s corescripts (like you said), the images in the internal assets folder, or in-game (in the CoreGui folder or a player’s character model).

2 Likes

yeah that’s true this would be much easier

local name = game.ReplicatedStorage:WaitForChild("DisplayName"):Clone()
name.CFrame = character.Head.CFrame + character.Head.CFrame.upVector*2
name.Parent = character.Head
name.BillboardGui.Adornee = character.Head

but I never really tried checking to see how humanoids name tags are handled

Oh! Thank you for pointing the corners out, I never actually realised that before! I probably wasn’t paying attention when I first looked at it. I do notice there’s a difference, but the linked game’s looks very close to the default nametags. Sounds about right.

I appreciate your help; this seems to tackle what I was asking. I figured it would be internally rendered after completely clearing my CoreGui and the CorePackages in a test server, yet still seeing the nametags on. I was just unsure if that was really the case or if I glossed over something.

1 Like

obviously. :stuck_out_tongue:

I was just agreeing with him, using relevant code, but I’ve misunderstood what he was wanting anyway.

also you’ll definitely need renderstepped and this setup (or some sort of loop) to handle the resizing based on distance.