How to check amount of lines in a TextBox?
Use string.split()
local textbox = path.to.textbox
local splittedText = textbox.Text:split("\n")
local lineCount = #splittedText
print("Theres "..lineCount.." lines in the textbox.")
Lets image that textbox value is this
when we execute the code, it will print 2
since its have 2 lines.
1 Like