How to make a forward nametag?

I’m trying to make a nametag that’s bottom-positioned instead of being overhead. I’ve tried using an “anchor” part by creating a transparent part that has a weld, which somewhat got me in the direction I wanted, however, it was directly on top of the player’s feet instead of being forward a bit. This led me to writing a script that uses an attachment instead (with the help of ChatGPT honestly, cameras/positioning isn’t really my forte so I apology in advance):

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local hrp = character:WaitForChild("HumanoidRootPart")
		
		
		local attachment = Instance.new("Attachment")
		attachment.Name = "NameTagAttachment"
		attachment.Parent = hrp
		
		-- Billboard GUI
		local billboard = Instance.new("BillboardGui")
		billboard.Adornee = attachment
		billboard.Size = UDim2.new(0, 200, 0, 50)
		billboard.StudsOffset = Vector3.new(0, -3, -1)
		billboard.AlwaysOnTop = true
		billboard.Name = "BottomNameTag"
		billboard.Parent = hrp

		-- TextLabel inside
		local label = Instance.new("TextLabel")
		label.Size = UDim2.new(1, 0, 1, 0)
		label.BackgroundTransparency = 1
		label.TextSize = 20
		label.TextColor3 = Color3.new(1, 1, 1)
		label.TextStrokeTransparency = 0.5
		label.Font = Enum.Font.FredokaOne
		label.Text = player.DisplayName
		label.Parent = billboard
	end)
end)

This gives me a result of:
image

Which is super close to what I want to achieve, however, I’d like it to be pushed out away from the character a bit. The biggest issue I’m facing is the fact that my camera is scripted as:

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local camera = workspace.CurrentCamera

camera.CameraType = Enum.CameraType.Scriptable

local function updateCamera()
	character = player.Character
	if not character or not character:FindFirstChild("HumanoidRootPart") then return end

	local rootPart = character.HumanoidRootPart

	local camOffset = Vector3.new(0, 10, -20)
	local camPos = rootPart.Position + camOffset

	local lookAt = rootPart.Position + Vector3.new(0, 5, 0)

	camera.CFrame = CFrame.new(camPos, lookAt)
end

RunService.RenderStepped:Connect(updateCamera)

What I mean by that is a lot of already existing tutorials have not worked. What am I missing here? User error? A limitation in the way Roblox objects can be placed? I appreciate everyone’s time & assistance in advance. Here’s a pic of my intended outcome for reference, I just want the name:
image

1 Like

Why don’t you just use an offset from the HumanoidRootPart with a weld constraint

1 Like

I’m not sure that I understand your issue correctly. Can you specify your issue?

Normally, you shouldn’t need any attachments or invisible parts for that.
In BillboardGui there are multiple properties related to world size and screen size.

Try messing with the Size of the billboard, use scale so that the billboard’s size changes depending on how far the camera is.

image
?

This is what I ended up doing again, ended up realizing I was getting a few things mixed up when doing it the first time. Thank you, I appreciate it.

1 Like