How to add a new line when editing script source (plugin development)

Hello!

I’ve been learning how to make plugins and I am trying to make a script where you just add variables. When you add a variable there is supposed to be a new line.
Unfortunately, that’s now how it’s working right now.

This is what I want it to look like:

local English = "Hi"			
local Spanish = "hola"			
local French = "bonjour"			
local Chinese = "ni hao"

This is what it looks like:

			local English = "Hi"			local Spanish = "hola"			local French = "bonjour"			local Chinese = "ni hao"

This is how I would add a new line but of course it doesn’t work:

local addToSource = [[
and then the line for the variable goes here]]

How can I do this? Thanks!

1 Like

you can add a \n after each variable and it will go to a new line

example:

someScript.Source = "local test = true \n local someOtherVariable = false"
local addToSource = [[
and then the line for the variable goes here]]

You were nearly there, you just needed to add quotation marks.

local addToSource = [["
and then the line for the variable goes here"]]

Like the above.

1 Like