Skip to main content

ClientRemoteSignal

This item only works when running on the client. Client

Created via ClientComm:GetSignal().

Types

Connection

interface Connection {
Disconnect() → ()
}

Represents a connection.

Functions

Connect

ClientRemoteSignal:Connect(fn(...any) → ()) → Connection

Connects a function to the remote signal. The function will be called anytime the equivalent server-side RemoteSignal is fired at this specific client that created this client signal.

Fire

ClientRemoteSignal:Fire(...any) → ()

Fires the equivalent server-side signal with the given arguments.

Outbound Middleware

All arguments pass through any outbound middleware before being sent to the server.

Destroy

ClientRemoteSignal:Destroy() → ()

Destroys the ClientRemoteSignal object.

Show raw api
{
    "functions": [
        {
            "name": "Connect",
            "desc": "Connects a function to the remote signal. The function will be\ncalled anytime the equivalent server-side RemoteSignal is\nfired at this specific client that created this client signal.",
            "params": [
                {
                    "name": "fn",
                    "desc": "",
                    "lua_type": "(...: any) -> ()"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Connection"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 76,
                "path": "modules/comm/Client/ClientRemoteSignal.lua"
            }
        },
        {
            "name": "Fire",
            "desc": "Fires the equivalent server-side signal with the given arguments.\n\n:::note Outbound Middleware\nAll arguments pass through any outbound middleware before being\nsent to the server.\n:::",
            "params": [
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 92,
                "path": "modules/comm/Client/ClientRemoteSignal.lua"
            }
        },
        {
            "name": "Destroy",
            "desc": "Destroys the ClientRemoteSignal object.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 103,
                "path": "modules/comm/Client/ClientRemoteSignal.lua"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "Connection",
            "desc": "Represents a connection.",
            "fields": [
                {
                    "name": "Disconnect",
                    "lua_type": "() -> ()",
                    "desc": ""
                }
            ],
            "source": {
                "line": 23,
                "path": "modules/comm/Client/ClientRemoteSignal.lua"
            }
        }
    ],
    "name": "ClientRemoteSignal",
    "desc": "Created via `ClientComm:GetSignal()`.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 13,
        "path": "modules/comm/Client/ClientRemoteSignal.lua"
    }
}