✓ Accepted answer
http://wiki.roblox.com/index.php?title=API:Class/TextBox
TextBox has a property that checks if your text fits. So based on this you can do something along these lines.
(Note: Written away from studio, not guaranteed to work 100%)
local box = script.Parent
local lastSize = 0
local boxMin = 75
spawn(function()
while wait(0.01) do
if box:IsFocused() then
if not box.TextFits then box.Size = box.Size + UDim2.new(0,8,0,0) end
if string.len(box.Text) < lastSize then if box.Size.X.Offset > boxMin then box.Size = box.Size - UDim2.new(0,6,0,0) end end
end
lastSize = string.len(box.Text)
end
end)
1 comment
Or it scrolls while typing?