Name Tag Gui won't stop moving around on the screen when walking/running/jumping

  1. What do you want to achieve?
    I’d like the “Name Tag” Gui that shows over the players head to stop moving around all over the place when walking/running/jumping.
  2. What is the issue?
    I’m not sure how to fix the Gui into place so that it doesn’t seemingly wobble around all over the place rather than just staying above the players head.
  3. What solutions have you tried so far?
    I have searched through here as well as YT and haven’t been able to find a solution to my problem.

P.S. I wasn’t able to upload the video example to here as the file is too big. If anyone has an idea as to what I’m trying to find a solution for though please feel free to comment here and share your thoughts.

4 Likes

By “moving around all over the place” do you mean the bobbing of the head? If so, make the gui under the HumanoidRootPart.

3 Likes

this may work … really didn’t test it.
You will need to modify it to match the name of your tag.

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local head = character:WaitForChild("Head")

local nameTag = head:WaitForChild("NameTag")

nameTag.Parent = head
nameTag.Adornee = head
nameTag.Position = UDim2.new(0, 0, 0, -head.Size.Y)

head:GetPropertyChangedSignal("Position"):Connect(function()
    nameTag.Position = UDim2.new(0, 0, 0, -head.Size.Y)
end)

Kind of like Cake’s thinking if that works …

3 Likes

Yes that’s exactly what I meant haha.

1 Like

I’m pretty sure that this doesn’t change much because you’re still using the head, which position changes during the head bobbing. I think this is just something that billboard guis already do (updating their position when the position of their adornee changes)

2 Likes

Okay yeah, tbh I’m very stuck right now so will have to come back to this in the future. I think I’m just very confused with the scripting since it isn’t my script that I’m using as well so I don’t 100% understand what would need to be tweaked to make it less “wobbly” or just stay more in place.

Thank you both though! I’ll try figure out from what you guys have said how to edit the script so it’s not so weird when morphing lol.

2 Likes

May you include a video of the issue occurring?

2 Likes

Wait, why don’t you just use BillboardGui?

here’s a script that can help you out.

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local head = character:WaitForChild("Head")

local nameTag = Instance.new("BillboardGui")
nameTag.Parent = head
nameTag.Adornee = head
nameTag.AlwaysOnTop = true

-- Adjust the position if needed
nameTag.StudsOffset = Vector3.new(0, 2, 0) -- Example offset

local nameLabel = Instance.new("TextLabel")
nameLabel.Parent = nameTag
nameLabel.Text = "PlayerName" -- You can replace this with the player's name
nameLabel.Size = UDim2.new(0, 100, 0, 30) -- Adjust as needed
nameLabel.TextScaled = true
  1. You can adjust the StudsOffset property to fine-tune the position of the BillboardGui.
  2. Use RenderStepped for Positioning: Instead of relying on the GetPropertyChangedSignal("Position"), use RunService.RenderStepped to continuously update the position. This may provide smoother positioning.
local RunService = game:GetService("RunService")

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local head = character:WaitForChild("Head")

local nameTag = head:WaitForChild("NameTag")
nameTag.Parent = head
nameTag.Adornee = head

RunService.RenderStepped:Connect(function()
    nameTag.Position = UDim2.new(0, 0, 0, -head.Size.Y)
end)
1 Like

You’re probably right. Just took a guess.

1 Like

If you need a certain part of the script to be changed, just let me know and I will do so as quick as possible!

1 Like

Could you send me a link to it? Would love to check it out as I am struggling with the vast majority of coding atm.

Also will look into this later when I can, I have to adjust the other devs script to something similar to this to see if it’ll work or try this in a separate game file so I can see how it works. Thank you for your help!

Thanks for letting me help you!

Reach out to me at any time if you’re having an issue Developing!

Goodbye!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.