I’m unsure how I would use scalars to reposition my GUI depending on the value of a changing leaderstat.
Since the value can increase from 0 and go well into the millions, I don’t know how I can keep the text’s position scaled correctly.
local textBox = script.Parent
local minWidth, minHeight = 50, 50 -- This line needs changing
textBox.TextXAlignment = Enum.TextXAlignment.Left
textBox.TextYAlignment = Enum.TextYAlignment.Top
local function updateSize()
textBox.Size = UDim2.new(
0, math.max(minWidth, textBox.TextBounds.X),
0, math.max(minHeight, textBox.TextBounds.Y)
)
end
textBox:GetPropertyChangedSignal("TextBounds"):Connect(updateSize)
Thanks for the help!

1 comment
Can you edit your question to fix that last line?