So I have this TextBox. I want to make it so its size is always the same as its textbounds. I think the way to do it is to convert TextBounds to UDim2, and make it so it's size is that. But TextBounds is 2 numbers, and UDim2 is 4.
--This is what I tried
local CodeBox = script.Parent
local CodeBox_Size = script.Parent.Size
local CodeBox_TextBounds = script.Parent.TextBounds
for i=0,math.huge do --infinite loop
wait()
CodeBox.Size = UDim2.new(CodeBox_TextBounds)
end

3 comments
When I run it, the size changes to the bounds of the text. After that, when I change the text, it still stays the same size and breaks.
Updated. Recheck on what I said.
Still doesn't work, instead of expanding when I put in more text, it shrinks. Oh well, I guess I'll have to just use another method.