There’s no difference at all between using “.” and “:” in practical terms, both will execute the function.
Some people prefer different kinds of appliances, but at the end of the day you’re the one to decide if you want to use “.” or “:”.
I personally like to use both, but I want to choose which one I’ll use for the entire module.
Edit: I’m quite sure one of them passes “self” as one of the arguments to the function, but I forgot which one it was, if you’ll never use self then it’s not necessary.
“.” calls it like a function, and “:” calls it like a method, i.e., implicitly passing the self argument, which is equal to whatever table it was called on.
local counter = {count = 0}
function counter:Increment()
self.count += 1 --self and counter are the same thing in this case
end
counter:Increment()
print(counter.count) --> 1