the : notation passes ‘self’ automatically as the first argument, to my knowledge, this is only done when writing with OOP (Object Oriented Programming)
here is more about how it works:
If u use function module:BlahBlahBalh() it passes ‘self’ . you might ask, what is self? Self is basically the table that the function is stored in .
eg)
local module = {}
module.Player = "skyblox"
function module:SkybloxBest()
print(self)
end
function module:Test()
print(self)
end
return module
if i use the function SkybloxBest, it will print the variable called module which is a table that contains Player, function SkybloxBest() and function Test()
however , if you use function module.Hi() , the variable self will be nil