Frequently I've seen many For loops have this symbol before something like "game.Lighting:GetChildren()," making it "#game.Lighting:GetChildren()." I was wondering what the "#" has to do with any of this.
✓ ANSWER ACCEPTED
Why Do Some For Loops Have a "#"?
1 answer
✓ Accepted answer
Length
The # operator is the length operator, and gets the length of a table or a string. In most of these loops you're looking at, it's telling it to run the loop as many times as there are entries in the table.
If you're not sure about what I said, you should learn tables.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thanks!