What does — do in scripts?

Hello! So I’ve read uncopylocked games scripts and I was watching a scripting stream and I see people doing — not to say what something means but something else! image What does it mean? When they do —

2 Likes

– is used when you want to explain or describe something in your script. It does not affect the script.

Ex: – this object is used to multiply the block

Edit: In the picture above it looks like it’s used to color the script.

2 Likes

But it’s used to tell you what the code says but somehow the code is running in-game?

It’s basically a comment, it does nothing.

Basically they commented out that section because they might need it, and they didn’t need it so they just commented it out. Some people do this instead of deleting because you may need that line in the future if you don’t want to type it out again.


@Jlnxyits it’s not used to colour the script.

2 Likes

Personally I’ve never seen scripting displayed like that, maybe since it’s an uncopylocked game it might be old code. Anyways ‘–’ is used for different reasons. The way I use it for is describing my script so I can understand it more.

It literally does nothing. Just a note.

Gave the wrong person solution! Meant to give it to you! I get it.

It is basically used for script documentation, you can use this if you need to make comments that span multiple lines:

--[[
   Comments in
   here can span
   multiple lines
]]

that’s what - is for, not _

what are talking about? I don’t understand your statement.

What do you mean, lol.

What are saying about my reply?

You were talking about - but it’s about _

No the OP is talking about the line that has “–” at the beginning, which is a comment, so I’m showing him how you can write comments that span multiple lines.

Like I said, it’s a _ not a -

Lol looks like I was wrong

i feel stupid now

1 Like