What do you want to achieve? I am trying to make a script that can count the lines in a text label when TextWrapped is on.
What is the issue? Whenever I try, it always says there is only one line, even when there isn’t
What solutions have you tried so far? I tried doing string.split “\n” (I also want to get a list of each line)
function getLines(textLabel) return (textLabel.Text).split("\n") end label = Instance.new("TextLabel") label.TextWrapped = true label.Text = "Blah blah blah more text here whatever. I like cats...... hmmmmm? Idk." -- ^ that is too much text, so the text box wraps it ^ for i, line in pairs(getLines(label)) do print(i .. ") " .. line) end
That prints out:
1) "Blah blah blah more text here whatever. I like cats...... hmmmmm? Idk."
even though the text box wraps, so it should be more.
Does anyone have any ideas?