I am trying to create a GUI button that changes it’s text on input. The problem is that I don’t know how to write the text in 2 lines. I tried the steps described in this forum post, but nothing works for me the way I want (Line break does not format the text how I want). What should I do?
Have you checked the Line Break checkbox?
I said in my original post that it does not format the text the way I want
You can force a line break with \n. I don’t know if it works when setting it in editor, but should work if using gui.set_text().
Can you provide an example, beacouse I tried it, but I don’t think I used it correctly.
gui.set_text(node, "like \n this")
On mobile so can’t test myself.
2 Likes
It doesn’t work for me
gui.set_text(node, "Text 1 /n Text 2")
That’s not a backslash, that’s a forward slash.
1 Like
Oh, it needs to be a backslash. My bad
It works now, thank you!
1 Like