In my game you can write anything on a page and I was wondering if their was a function or something that would allow me to detect when theirs no more room to write it swaps to the next page.
bumping as I still havent found a solution.
Theres no build in way but you can add it easily by first checking how many characters you want to be able to fit in a textbox, set that to a variable and then whenever the textbot text is updated, meaning the player typed something into it see if the number of characters in the texbox is that number and if so have your logic to going to the next page
This function can help you: TextService:GetTextBoundsAsync(params)
You give it the Width of your page and check to see if the returned Y size is larger than you want (Use AbsoluteSize.Y property). Then use TextBox:CaptureFocus() to force the user to change the TextBox.
local TextService = game:GetService("TextService")
local params = Instance.new("GetTextBoundsParams")
params.Text = "hello world!"
params.Font = Font.new("rbxasset://fonts/families/GrenzeGotisch.json", Enum.FontWeight.Thin)
params.Size = 20
params.Width = 200
local size = TextService:GetTextBoundsAsync(params)
print("The size of the text is:", size)
You can give me more details so I can help you properly.
Edit: there is also TextFits property in a TextBox, so choose what fits you the most https://create.roblox.com/docs/reference/engine/classes/TextBox#TextFits