I'm still rather new to scripting, and from time to time I'll see something like
for i = 1, #players
What does the # symbol mean?
The #
symbol means that it is the number of children in a table.
So if I wanted to know how many parts are in a model, I can get a table with :GetChildren()
and do something like this.
if #game.Workspace.Model:GetChildren() > 4 then print("Too many parts!") end
What this does is it gets the table of all the children in the model "Model", and puts it into a table. Then the #
sign counts all the items in the table.
The code above is less practicle for the situation, but it shows what I am saying.