Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Is it possible to put multiple lines of string?

Asked by 4 years ago
Edited 4 years ago

I am working on a plugin that develops a script for you from the input that the user gives. The problem is, I have to add to the already there script. To do so, I need to indent one line lower so the script does not have everything on one line. So is it possible to indent the string onto multiple lines?

1
I'd like to introduce you to the special character "\n", AKA Newline character. Jahaziel_VanDerHas 238 — 4y

2 answers

Log in to vote
2
Answered by 4 years ago

You can use newline characters which are represented by \n in your string. For example, if you had a Script in Workspace just called Script, you could set the source like this:

game.Workspace.Script.Source = "local a = 1\nlocal b = 2"

And the two variable declarations will be on different lines, like this:

local a = 1
local b = 2
0
Sorry for the late acceptance, I did not see your reply. Thanks! greenhamster1 180 — 4y
Ad
Log in to vote
0
Answered by
Farsalis 369 Moderation Voter
4 years ago
Edited 4 years ago

Try Using "TextScaled", on your TextBox's Text. Not Place-Holder Text.

Hope That Helped.

0
I was more meaning for the format of just a string so that it can become the script greenhamster1 180 — 4y
0
Then what EmilBendsSpace said would work. Farsalis 369 — 4y

Answer this question