Multiline textlabel

I have recently been having trouble with newline and a text label. Currently, I have a textbox that takes in whatever I write. I then set the textbox’s text to the textlabel’s text. The issue is when I don’t type a character on a line and press enter to go to a newline, the textlable doesn’t follow the newline.
This video shows the issue (Textbox in yellow and textlabel in white)

	CodeBoxVisuals.Text = CodeBox.Text

Any help is greatly appreciated

Is CodeBoxVisuals being updated to the correct TextLabel every time you move to a new line?

Yes, I actually looped through the string and tried to find newlines

    for i= 1,#CodeBoxVisuals.Text do
		if string.sub(CodeBoxVisuals.Text,i,i+1) == '\n' then

It prints the correct amount of new lines.

So are you using one TextLabel for the whole thing or a TextLabel per line?

One textlabel and one textbox

min char