Skip to main content

RemotingMember

Helper class for the Remoting object which allows more natural syntax to be used against the remoting API surface.

Functions​

new​

RemotingMember.new(
remoting: Remoting,
memberName: string,
remotingRealm: RemotingRealms
) → RemotingMember

Constructs a new RemotingMember

Bind​

RemotingMember.Bind(
callback: function
) → MaidTask

Binds to the member.

On the server this will create the remote function. On the client this will bind to the remote function once it's created.

Connect​

RemotingMember.Connect(
callback: function
) → MaidTask

Connects to the equivalent of a RemoteEvent for this member.

On the server this will create the remote event. On the client this will connect to the remote event once it's created.

See Remoting.Connect for additional details.

DeclareEvent​

RemotingMember.DeclareEvent(self: RemotingMember) → ()

Forward declares an event on the remoting object

DeclareMethod​

RemotingMember.DeclareMethod(self: RemotingMember) → ()

Forward declares a method on the remoting object

FireServer​

This item only works when running on the client. Client
RemotingMember.FireServer(
...: any
) → ()

Fires the remote event on the server

InvokeServer​

This item only works when running on the client. Client
RemotingMember.InvokeServer(
...: any
) → Promise.Promise<...any>

Invokes the server from the client

PromiseInvokeServer​

This item only works when running on the client. Client
RemotingMember.PromiseInvokeServer(
...: any
) → Promise.Promise<...any>

Invokes the server from the client.

PromiseFireServer​

This item only works when running on the client. Client
RemotingMember.PromiseFireServer(
...: any
) → Promise

Fires the server from the client. Promise resolves once the event is sent.

PromiseInvokeClient​

This item only works when running on the server. Server
RemotingMember.PromiseInvokeClient(
player: Player,
...: any
) → Promise<any>

Invokes the client from the server.

See Remoting.PromiseInvokeClient.

InvokeClient​

This item only works when running on the server. Server
RemotingMember.InvokeClient(
player: Player,
...: any
) → ...any

Invokes the client from the server

See Remoting.InvokeClient.

FireAllClients​

This item only works when running on the server. Server
RemotingMember.FireAllClients(
...: any
) → ()

Fires all clients.

See Remoting.FireAllClients.

FireAllClientsExcept​

This item only works when running on the server. Server
RemotingMember.FireAllClientsExcept(
excludePlayer: Player | nil,
...: any
) → ()

Fires all clients with the event except the excluded player. The excluded player may be nil to support NPC actions.

FireClient​

This item only works when running on the server. Server
RemotingMember.FireClient(
player: Instance,
...: any
) → ()

Fires the client with the data

See Remoting.FireClient.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new RemotingMember",
            "params": [
                {
                    "name": "remoting",
                    "desc": "",
                    "lua_type": "Remoting"
                },
                {
                    "name": "memberName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "remotingRealm",
                    "desc": "",
                    "lua_type": "RemotingRealms"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "RemotingMember"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 37,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "Bind",
            "desc": "Binds to the member.\n\nOn the server this will create the remote function. On the client\nthis will bind to the remote function once it's created.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                },
                {
                    "name": "callback",
                    "desc": "",
                    "lua_type": "function"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "MaidTask"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 60,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "Connect",
            "desc": "Connects to the equivalent of a RemoteEvent for this member.\n\nOn the server this will create the remote event. On the client\nthis will connect to the remote event once it's created.\n\nSee [Remoting.Connect] for additional details.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                },
                {
                    "name": "callback",
                    "desc": "",
                    "lua_type": "function"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "MaidTask"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 77,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "DeclareEvent",
            "desc": "Forward declares an event on the remoting object",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 86,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "DeclareMethod",
            "desc": "Forward declares a method on the remoting object",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 93,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "FireServer",
            "desc": "Fires the remote event on the server",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "static",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 103,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "InvokeServer",
            "desc": "Invokes the server from the client",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<...any>\n"
                }
            ],
            "function_type": "static",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 114,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "PromiseInvokeServer",
            "desc": "Invokes the server from the client.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise.Promise<...any>\n"
                }
            ],
            "function_type": "static",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 126,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "PromiseFireServer",
            "desc": "Fires the server from the client. Promise resolves once the event is sent.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise"
                }
            ],
            "function_type": "static",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 139,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "PromiseInvokeClient",
            "desc": "Invokes the client from the server.\n\nSee [Remoting.PromiseInvokeClient].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<any>"
                }
            ],
            "function_type": "static",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 155,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "InvokeClient",
            "desc": "Invokes the client from the server\n\nSee [Remoting.InvokeClient].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "... any"
                }
            ],
            "function_type": "static",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 172,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "FireAllClients",
            "desc": "Fires all clients.\n\nSee [Remoting.FireAllClients].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "static",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 187,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "FireAllClientsExcept",
            "desc": "Fires all clients with the event except the excluded player. The excluded player may be nil to support\nNPC actions.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                },
                {
                    "name": "excludePlayer",
                    "desc": "",
                    "lua_type": "Player | nil"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "static",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 201,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "FireClient",
            "desc": "Fires the client with the data\n\nSee [Remoting.FireClient].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "RemotingMember"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Instance"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "static",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 221,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "RemotingMember",
    "desc": "Helper class for the [Remoting] object which allows more natural syntax\nto be used against the remoting API surface.",
    "source": {
        "line": 8,
        "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
    }
}