How to Make Elastic Nametag UI

Hello, recently I’ve been trying to make a sleek UI system for my Roblox group.


concept art


nametag concept

However, I am not a seasoned scripter, in fact I just started.

I want to make an overhead nametag that isnt so janky, and harsh in its movement. Ideally the UI would follow the player in a “draggy, smooth motion”, like butter, but I can’t figure out how.

https://i.gyazo.com/ce1c3712eddf54bbca6098148703b094.gif
gif of janky nametag movement

The overhead GUI does not have a position property, so I can’t adapt a script I borrowed from a tutrorial.

Heres the script

local TweenService = game:GetService("TweenService")

local overheadGUI = game.ServerStorage.OverheadGUI:Clone()

local info = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 1, true)


game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		overheadGUI.Frame.TextLabel.Text = player.Name
		overheadGUI.Parent = character.Head
		local NewPosition = overheadGUI.Parent.Position
		local tween = TweenService:Create(overheadGUI, info, {Position = NewPosition})
		tween:Play()
	end)
end)

I don’t know where to begin, so i’m open to completely new solutions.

BillboardGuis don’t have the property Position

I know, thats the problem i’m running into. There would have to be a totally diff approach.

i think you can use ExtentsOffsetWorldSpace?

1 Like

You could add a part above the players head and have that move with the player.

Here is a video that shows how:

1 Like

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