Skip to main content

ClientRemoteEvent

This item only works when running on the client. Client

Client-side remote event class for receiving and sending events to the server.

Functions

Connect

ClientRemoteEvent: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

ClientRemoteEvent: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.

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": 225,
                "path": "lib/netwire/src/NetWireTypes.luau"
            }
        },
        {
            "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": 238,
                "path": "lib/netwire/src/NetWireTypes.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "ClientRemoteEvent",
    "desc": "Client-side remote event class for receiving and sending events to the server.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 214,
        "path": "lib/netwire/src/NetWireTypes.luau"
    }
}