Skip to main content

ClientFunction

Functions

new

ClientFunction.new(instanceRemoteEvent) → ClientFunction

Fire

ClientFunction:Fire(
expects{TypeCheckFunc},--

What is expected to be returned from the server

...any
) → Promise

Invokes the underlying event to the server and wraps it in a promise which resolves with whatever the server returns.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "",
            "params": [
                {
                    "name": "instance",
                    "desc": "",
                    "lua_type": "RemoteEvent"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ClientFunction"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 154,
                "path": "Source/Networking/Classes/Client.luau"
            }
        },
        {
            "name": "Fire",
            "desc": "Invokes the underlying event to the server and wraps it in a promise\nwhich resolves with whatever the server returns.",
            "params": [
                {
                    "name": "expects",
                    "desc": "What is expected to be returned from the server",
                    "lua_type": "{TypeCheckFunc}"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 179,
                "path": "Source/Networking/Classes/Client.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "_Instance",
            "desc": "\t",
            "lua_type": "RemoteEvent",
            "private": true,
            "readonly": true,
            "source": {
                "line": 163,
                "path": "Source/Networking/Classes/Client.luau"
            }
        }
    ],
    "types": [],
    "name": "ClientFunction",
    "desc": "",
    "source": {
        "line": 140,
        "path": "Source/Networking/Classes/Client.luau"
    }
}