Skip to main content

RemoteSignal

Weaver's built-in implementation for RemoteEvents.

This is an interface meant to make using RemoteEvents much easier, with functions identical to Signal.

Types

RemoteConnectionCallback

type RemoteConnectionCallback = (...any) → () | (
ClientPlayer,
...any
)

Properties

Unreliable

This item is read only and cannot be modified. Read Only
RemoteSignal.Unreliable: boolean

Determines whether the RemoteSignal is unreliable or not.

Functions

Fire

This item only works when running on the server. Server
RemoteSignal:Fire(
ClientPlayer,
......any--

The arguments to send over this RemoteSignal.

) → ()

Fires to the specified client, from the server.

caution

The first argument of Fire must be a Player.

FireAll

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

Fires to all clients in the game.

FireFor

This item only works when running on the server. Server
RemoteSignal:FireFor(
For{Player},
......any
) → ()

Fires to all clients specified in For.

FireExcept

This item only works when running on the server. Server
RemoteSignal:FireExcept(
Excluding{Player},
......any
) → ()

Fires to all clients in the game, except for the clients specified.

FireFilter

This item only works when running on the server. Server
RemoteSignal:FireFilter(
Filter(
ClientPlayer,
...any
) → boolean,
......any
) → ()

Fires to all clients in the game, using a filter to specify which clients receive the event.

Fire

This item only works when running on the client. Client
RemoteSignal:Fire(
......any--

The arguments to send over this RemoteSignal.

) → ()

Fires to the server, from the client.

Connect

RemoteSignal:Connect(
CallbackRemoteConnectionCallback--

The function to connect.

) → RBXScriptConnection

Connects Callback to this RemoteSignal.

Executes when a client fires this RemoteSignal to the server, or vice versa.

ConnectParallel

RemoteSignal:ConnectParallel(
CallbackRemoteConnectionCallback--

The function to connect.

) → RBXScriptConnection

Connects Callback to this RemoteSignal in parallel. Useful with Parallel Luau.

Executes when a client fires this RemoteSignal to the server, or vice versa.

Once

RemoteSignal:Once(
CallbackRemoteConnectionCallback--

The function to connect.

) → RBXScriptConnection

Connects Callback to this RemoteSignal, disconnecting it once the RemoteSignal has fired once.

Wait

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
RemoteSignal:Wait() → ...any--

All of the data that the RemoteSignal returned from one event.

Waits for the event to fire before resuming the current thread.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new RemoteSignal object.",
            "params": [
                {
                    "name": "From",
                    "desc": "The SignalListener to hook.",
                    "lua_type": "SignalListener"
                },
                {
                    "name": "Inbound",
                    "desc": "",
                    "lua_type": "Helpers.MiddlewareCallbacks"
                },
                {
                    "name": "Outbound",
                    "desc": "",
                    "lua_type": "Helpers.MiddlewareCallbacks"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "RemoteSignal"
                }
            ],
            "function_type": "static",
            "private": true,
            "source": {
                "line": 141,
                "path": "src/Internals/RemoteSignal.luau"
            }
        },
        {
            "name": "Fire",
            "desc": "Fires to the specified client, from the server.\n\n:::caution\n\nThe first argument of `Fire` must be a [Player].\n\n:::\n\n\t",
            "params": [
                {
                    "name": "Client",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "...",
                    "desc": "The arguments to send over this RemoteSignal.",
                    "lua_type": "...any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 168,
                "path": "src/Internals/RemoteSignal.luau"
            }
        },
        {
            "name": "FireAll",
            "desc": "Fires to all clients in the game.\n\n\t",
            "params": [
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "...any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 182,
                "path": "src/Internals/RemoteSignal.luau"
            }
        },
        {
            "name": "FireFor",
            "desc": "Fires to all clients specified in `For`.\n\n\t",
            "params": [
                {
                    "name": "For",
                    "desc": "",
                    "lua_type": "{ Player }"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "...any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 198,
                "path": "src/Internals/RemoteSignal.luau"
            }
        },
        {
            "name": "FireExcept",
            "desc": "Fires to all clients in the game, except for the clients specified.\n\n\t",
            "params": [
                {
                    "name": "Excluding",
                    "desc": "",
                    "lua_type": "{ Player }"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "...any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 210,
                "path": "src/Internals/RemoteSignal.luau"
            }
        },
        {
            "name": "FireFilter",
            "desc": "Fires to all clients in the game, using a filter to specify which clients receive the event.\n\n\t",
            "params": [
                {
                    "name": "Filter",
                    "desc": "",
                    "lua_type": "(Client: Player, ...any) -> boolean"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "...any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 224,
                "path": "src/Internals/RemoteSignal.luau"
            }
        },
        {
            "name": "Fire",
            "desc": "Fires to the server, from the client.\n\n\t",
            "params": [
                {
                    "name": "...",
                    "desc": "The arguments to send over this RemoteSignal.",
                    "lua_type": "...any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 241,
                "path": "src/Internals/RemoteSignal.luau"
            }
        },
        {
            "name": "Connect",
            "desc": "Connects `Callback` to this RemoteSignal.\n\nExecutes when a client fires this RemoteSignal to the server, or vice versa.",
            "params": [
                {
                    "name": "Callback",
                    "desc": "The function to connect.",
                    "lua_type": "RemoteConnectionCallback"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "RBXScriptConnection"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 257,
                "path": "src/Internals/RemoteSignal.luau"
            }
        },
        {
            "name": "ConnectParallel",
            "desc": "Connects `Callback` to this RemoteSignal in parallel. Useful with Parallel Luau.\n\nExecutes when a client fires this RemoteSignal to the server, or vice versa.",
            "params": [
                {
                    "name": "Callback",
                    "desc": "The function to connect.",
                    "lua_type": "RemoteConnectionCallback"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "RBXScriptConnection"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 273,
                "path": "src/Internals/RemoteSignal.luau"
            }
        },
        {
            "name": "Once",
            "desc": "Connects `Callback` to this RemoteSignal, disconnecting it once the RemoteSignal has fired once.",
            "params": [
                {
                    "name": "Callback",
                    "desc": "The function to connect.",
                    "lua_type": "RemoteConnectionCallback"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "RBXScriptConnection"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 287,
                "path": "src/Internals/RemoteSignal.luau"
            }
        },
        {
            "name": "Wait",
            "desc": "Waits for the event to fire before resuming the current thread.",
            "params": [],
            "returns": [
                {
                    "desc": "All of the data that the RemoteSignal returned from one event.",
                    "lua_type": "...any"
                }
            ],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 301,
                "path": "src/Internals/RemoteSignal.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "Unreliable",
            "desc": "Determines whether the RemoteSignal is unreliable or not.",
            "lua_type": "boolean",
            "readonly": true,
            "source": {
                "line": 106,
                "path": "src/Internals/RemoteSignal.luau"
            }
        }
    ],
    "types": [
        {
            "name": "RemoteConnectionCallback",
            "desc": "",
            "lua_type": "(...any) -> () | (Client: Player, ...any)",
            "source": {
                "line": 82,
                "path": "src/Internals/RemoteSignal.luau"
            }
        },
        {
            "name": "SignalListener",
            "desc": "",
            "lua_type": "Instance & { OnServerEvent: RBXScriptSignal<(Player, ...any)>, OnClientEvent: RBXScriptSignal<...any>, FireClient: (Client: Player, ...any) -> (), FireAllClients: (...any) -> (), FireServer: (...any) -> () }",
            "private": true,
            "source": {
                "line": 89,
                "path": "src/Internals/RemoteSignal.luau"
            }
        }
    ],
    "name": "RemoteSignal",
    "desc": "Weaver's built-in implementation for RemoteEvents.\n\nThis is an interface meant to make using RemoteEvents much easier, with functions identical to [Signal].",
    "source": {
        "line": 9,
        "path": "src/Internals/RemoteSignal.luau"
    }
}