Hello! This is my 1st time here, so let me know if I am doing anything wrong.
I have recently had the idea to make a autocorrect which can read multiple lines at once, but I don’t know how to read more than 1 line of text at a time! Can someone help? That would be really appreciative!
Welcome!
If you want to have multiple lines in a texbox, set it’s TextWrapped
property to true. That will allow it to write across multiple lines as text gets longer. If you also want it to write from the top left (as text usually does) you can set the TextXAlignment
to Left and TextYAlignment
to top.
You only need to read the text from a single textbox this way and it works exactly the same as before.
no i mean so i can press enter and can read that line aswell
bruh
Don’t you just want the MultiLine
property then? There’s nothing stopping you from using TextBox.Text
to read multiple lines. Unless you mean that you want to convert that text into a string without new lines, then you can use:
local text = string.gsub(TextBox.Text, "\n", "")
no i mean like a table of the lines, and what the line said
You can use string.split()
in a similar way then:
local TextRows = string.split(TextBox.Text, "\n")
Please explain it more if you want us to be able to help you.
I made something just for this