Multi-line comments in multi-line strings?

Just a dumb question:
I’m writing a plugin that inserts a (read-me) Script and I’m setting its code through Script.Source. I want to write a multi-line comment that serves as the whole “code” via multi-line strings. However, I’m not sure on how to do this.

If not possible, I’ll resort to commenting each line manually at the cost of looks. :slight_smile:

An example of what I want:

--plugin script local s = Instance.new("Script") s.Source = [[ --[[ ]] ]] --this errors so uhh
1 Like

You can parent a script to your plugin and disable it. Since its just a ‘ReadMe’ it doesn’t need to have any functionality.

2 Likes

You can use lua’s long brackets
It allows more literal strings in it because if you open the string’s first brackets with a = in between, to close it you’d need = again in between them, it’s kinda like a closing pattern and you can add as many = as you want

workspace.Script.Source = [=[ Now You can use Brackets in it: [[]] ]=] 

Although I want to say that I agree with @wolfscouthello1.

3 Likes

I agree with that, although in my case it would be more convenient to create it without functionality rather than cloning an existing script.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.