:: (static / manual Connect)
CL++ does not use ->. :: is static scope, datatype/library names, class method definitions, and manual signal connections (you Disconnect; Janitor does not).
Syntax
Section titled “Syntax”Vector3::new(1, 0, 1);task::wait(1);players.PlayerAdded::Connect(fn);void Class::Method(...) { }Parameters
Section titled “Parameters”None.
Return value
Section titled “Return value”The call result, or the nested name.
Luau emit
Section titled “Luau emit”Vector3.new(...) · task.wait(1) · players.PlayerAdded:Connect(fn) · function Class:Method
Description
Section titled “Description”Static / modules: task::wait, Vector3::new, BrickColor::Red().
Manual connections: players.PlayerAdded::Connect(fn) emits players.PlayerAdded:Connect(fn) with no Janitor. You own Disconnect. Prefer ~> when a janitor is in scope.
Definitions: Class::Method in a .clpp is the method body (function Class:Method).
Instance methods on a value use .: player.Kick(), workspace.FindFirstChild("x"). Protected calls use :.
Example
Section titled “Example”task::wait(1);players.PlayerAdded::Connect(fn);player.FindFirstChild("x");DataService.Server.WaitFor(p);Emits:
task.wait(1)players.PlayerAdded:Connect(fn)player:FindFirstChild("x")DataService.Server:WaitFor(p)See also
Section titled “See also”operator-property · operator-table · operator-janitor · class-method · Connect