I am trying to have a ScrollingFrame with a TextBox that grows indefinitely as more text is added.
I have ScrollingFrame.AutomaticCanvasSize.Y enabled and TextBox.AutomaticSize.Y enabled.
The problem is that AutomaticSize on the Textbox will not grow bigger than the parent frame (ScrollingFrame), which means that the AutomaticCanvasSize on the ScrollingFrame will not make the canvas bigger.
Is there something I am missing? How can I achieve a TextBox that expands indefinitely?
Is TextScaled set to true? If it isn’t and it still doesn’t work, then you’ll have to provide me with further details of what the textbox does now after the changes.
Finally, just got it to work. I had to use a LocalScript to work around AutomaticSize since it seemed to stop working after a while. Sorry, it took some time for me to figure it out. Anyway, here’s the file for you to check out:
This is good. I modified it slightly so that instead of using task.wait() in the while loop it does it instantly, that way there is no delay.
local TextBox = script.Parent
local InceaseYSize = 30 -- Change to the size of your font + 5.
game:GetService("RunService").RenderStepped:Connect(function()
if TextBox.TextFits == false then
TextBox.Size = UDim2.new(TextBox.Size.X.Scale, TextBox.Size.X.Offset, TextBox.Size.Y.Scale, TextBox.Size.Y.Offset + InceaseYSize)
end
end)