-
What do you want to achieve?
I am trying to make a cool overhead nametag system for players by adding their username with a custom textlabel that has a imagelabel before the textlabel (like: [ICON] Username), to have device icons or premium icons or group rank icons, and I basically cant really do the position code, I already have the sizing code, but I just need a little bit of help with the positioning of the frame…(ive been always bad with math) -
What is the issue?
i cant position properly the frame before the textlabel (read above for more info) -
What solutions have you tried so far?
I tried looking on the devforum for solutions (i am bad at math so i couldnt really fix it)
This is the code im currently using:
local Tip = script.Parent:WaitForChild("TextLabel")
local Frame = script.Parent:WaitForChild("Frame")
local minWidth, minHeight = 3, 3
Tip:GetPropertyChangedSignal("TextBounds"):Connect(function()
Tip.Size = UDim2.new(0, math.max(minWidth, Tip.TextBounds.X), 0, 50)
-- frame should position here
end)