Concepts - self
What is self
self is just a quality of life variable added in Lua that represents whatever the function is called on. Lua automatically creates this variable when defining functions with the : symbol.
hopefully you know how variable assigning works and if you don't, read Beginner_Tutorial_Variables
Here is an example:
The only difference between the ways are defined is if we let Lua define self for us, or if we want to define it ourselves
Garry's Mod
Rust
Steamworks
Wiki Help