Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What exactly does [[ do in scripting and what did I do wrong?

I found this in another game:

return require(script.Parent.CSV)([[tm,move
1,Hone Claws
118,Rock Climb]])

So I tried it myself:

game.ReplicatedStorage.aaaa.OnServerEvent:Connect(function(Player)
return([[point, item
50, walk
100, run]])
end)

But mine didn't work, what did I do wrong and what does [[ mean?

1 comment

0

This is actually a pretty good question.

1 answer

✓ Accepted answer

[[ ... ]] defines a multi-line which allows the person to write something that usually goes in just 1 line in several, it pretty much only helps with organization purposes inside of the script. writing that without "]]" would probably work like this:

return require(script.Parent.CSV)(tm,move1,Hone, Claws, 118,Rock, Climb)

This is just one of the very little things that Lua has that most people dont ever use, you can read more about this and other similiar stuff here: http://rigaux.org/language-study/syntax-across-languages-per-language/Lua.html

I hope this helped!

1 comment

0

[[ ]] is basicly the same as " ", basicly what he has said.

This discussion is preserved as it was. New answers, comments, and votes are closed.