All in all I’m just having some trouble understanding exactly how for loops work, and what kind of syntax’ I would use for certain types of operations.
For one, I want to get all the players with a loop and then do things if they apply to the if statement:
[lua]function ForLoopPly( pl )
for _, pl in pairs(player.GetAll()) do
else return end
An example, not actually doing anything here just asking if that would work. I still don’t understand the difference between for k, pl in pairs and for _, pl.
Also on another note, what are the main differences between local functions and plain old functions?
Thanks for any help provided,