Class::Method
Method implementation. Emits function Class:Method(...).
Syntax
Section titled “Syntax”void Class::Method(T arg) { @field = arg;}Parameters
Section titled “Parameters”None.
Return value
Section titled “Return value”Per signature.
Luau emit
Section titled “Luau emit”function Class:Method(arg: T)
Description
Section titled “Description”this / @this is self. Bare fields become self.field. @janitor is self.janitor. Untagged files with only Class:: return the table (ModuleScript).
Construct one service in init() and use it from lambdas.
Example
Section titled “Example”void LeaderstatsServer::OnPlayer(Player player) { post(player.Name);}Emits:
function LeaderstatsServer:OnPlayer(player: Player) print(player.Name)endSee also
Section titled “See also”struct · this · init · operator-method