Multiple lines in a textlabel

I want to display multiple different variables on their own lines in one textlabel. I have attempted to search for a solution, but all I found was information on how to make a string that contains the enter key. Here is an example to help explain what I want to do.
Say I have 3 variables: a,b, and c. a=1, b=2, and c=3. I would want the textlabel to look like this:
1
2
3

How would I do this?
sorry if the explanation is unclear in some way.

4 Likes

Maybe there’s some kind of variable that makes the text go up and down instead of left and right? If not then I’m not sure how’d you do that. I guess you can make 3 textlabels one on top of another if you can’t find any other solutions.

1 Like

Just separate each with a new line. You can create a newline in a string with \n

print("Hello\nworld!")

This will print

Hello
world
3 Likes

Thanks for the reply! This would not solve my problem, as that method only works if you’re inputting a string, and you can’t put variables inside of strings. I really appreciate your help!

I’ll definitely consider doing that if I can’t find a way to put it all in one textlabel. Thanks for your help!

You actually can, you can do something like this

local Text = A.."\n"..B.."\n"..C

I’m not entirely sure if that would work so lemme know if it does.

.. Basically adds two strings (or numbers) together, so that would be like doing

"1\n2\n3"
5 Likes

It worked! Thanks so much for helping me with this.