group:Add(disconnector: () -> ()): () -> ()

Server & Client

Registers a disconnect function (the direct return value of any Listen... method) into the group. Returns the same function unchanged, so it can be used inline around a Listen call.

Parameters

disconnector*
() -> ()
A disconnect function, typically returned directly by a Listen... call.

Returns

() -> ()The same disconnector passed in, for convenient inline chaining.
group:Add(replica:ListenToChange({"Health"}, onHealthChanged))