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(
remotingRemoting,
memberNamestring,
remotingRealmRemotingRealms
) → RemotingMember

Constructs a new RemotingMember

Bind

RemotingMember:Bind(callbackfunction) → MaidTask

Binds to the member.

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

Connect

RemotingMember:Connect(callbackfunction) → 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() → ()

Forward declares an event on the remoting object

DeclareMethod

RemotingMember:DeclareMethod() → ()

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) → ()

Invokes the server from the client

PromiseInvokeServer

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

Invokes the client from the server.

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(
playerPlayer,
...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(
playerPlayer,
...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(
excludePlayerPlayer | 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(
playerInstance,
...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": 24,
                "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 connect to the remote event once it's created.",
            "params": [
                {
                    "name": "callback",
                    "desc": "",
                    "lua_type": "function"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "MaidTask"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 43,
                "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": "callback",
                    "desc": "",
                    "lua_type": "function"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "MaidTask"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 60,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "DeclareEvent",
            "desc": "Forward declares an event on the remoting object",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 69,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "DeclareMethod",
            "desc": "Forward declares a method on the remoting object",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 76,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "FireServer",
            "desc": "Fires the remote event on the server",
            "params": [
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 86,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "InvokeServer",
            "desc": "Invokes the server from the client",
            "params": [
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 97,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "PromiseInvokeServer",
            "desc": "Invokes the client from the server.",
            "params": [
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 109,
                "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": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise"
                }
            ],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 122,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "PromiseInvokeClient",
            "desc": "Invokes the client from the server.\n\nSee [Remoting.PromiseInvokeClient].",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<any>"
                }
            ],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 139,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "InvokeClient",
            "desc": "Invokes the client from the server\n\nSee [Remoting.InvokeClient].",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "... any"
                }
            ],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 156,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "FireAllClients",
            "desc": "Fires all clients.\n\nSee [Remoting.FireAllClients].",
            "params": [
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 171,
                "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": "excludePlayer",
                    "desc": "",
                    "lua_type": "Player | nil"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 185,
                "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
            }
        },
        {
            "name": "FireClient",
            "desc": "Fires the client with the data\n\nSee [Remoting.FireClient].",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Instance"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 201,
                "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": 7,
        "path": "src/remoting/src/Shared/Interface/RemotingMember.lua"
    }
}