Skip to main content

CmdrClient

This item only works when running on the client. Client

The Cmdr client object and entry point.

Properties​

Registry​

This item is read only and cannot be modified. Read Only
CmdrClient.Registry: Registry

Refers to the command Registry.

Dispatcher​

This item is read only and cannot be modified. Read Only
CmdrClient.Dispatcher: Dispatcher

Refers to the command Dispatcher.

Util​

This item is read only and cannot be modified. Read Only
CmdrClient.Util: Util

Refers to a table containing many useful utility functions.

Gui​

This item is read only and cannot be modified. Read Only
CmdrClient.Gui: ScreenGui

Refers to the current Cmdr GUI.

Toggled​

This item is read only and cannot be modified. Read Only
CmdrClient.Toggled: {
Connect: (
self: Toggled,
callback: (visible: boolean) → ()
) → RBXScriptConnection,
Fire: (
self: Toggled,
visible: boolean
) → ()
}

A signal that fires when the Cmdr window is toggled.

Functions​

SetEnabled​

CmdrClient:SetEnabled(enabled: boolean) → ()

Sets whether or not Cmdr can be shown via the defined activation keys. Useful for when you want users to opt-in to show the console, for instance in a settings menu.

SetActivationKeys​

CmdrClient:SetActivationKeys(keys: {Enum.KeyCode}) → ()

Sets the key codes that will be used to toggle Cmdr.

SetActivationUnlocksMouse​

CmdrClient:SetActivationUnlocksMouse(enabled: boolean) → ()

Sets if activation will free the mouse.

Show​

CmdrClient:Show() → ()

Shows the Cmdr window. Does nothing if Cmdr isn't enabled.

Hide​

CmdrClient:Hide() → ()

Hides the Cmdr window.

Toggle​

CmdrClient:Toggle() → ()

Toggles the Cmdr window. Does nothing if Cmdr isn't enabled.

SetMashToEnable​

CmdrClient:SetMashToEnable(enabled: boolean) → ()

Enables the "Mash to enable" feature. This feature, when enabled, requires the activation key to be pressed 5 times within a second to enable Cmdr. This may be helpful to guard against mispresses from opening the window, for example.

SetHideOnLostFocus​

CmdrClient:SetHideOnLostFocus(enabled: boolean) → ()

Sets the hide on 'lost focus' feature. This feature, which is enabled by default, will cause Cmdr to hide when the user clicks off the window.

SetPlaceName​

CmdrClient:SetPlaceName(name: string) → ()

Sets the place name label on the interface. This is useful for a quick way to tell what game you're playing in a universe game.

HandleEvent​

CmdrClient:HandleEvent(
name: string,
callback: (...any) → ()
) → ()

Sets the network event handler for a certain event type.

Show raw api
{
    "functions": [
        {
            "name": "SetEnabled",
            "desc": "Sets whether or not Cmdr can be shown via the defined activation keys. Useful for when you want users to opt-in to show the console, for instance in a settings menu.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 229,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "SetActivationKeys",
            "desc": "Sets the key codes that will be used to toggle Cmdr.",
            "params": [
                {
                    "name": "keys",
                    "desc": "",
                    "lua_type": "{ Enum.KeyCode }"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 241,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "SetActivationUnlocksMouse",
            "desc": "Sets if activation will free the mouse.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 250,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Show",
            "desc": "Shows the Cmdr window. Does nothing if Cmdr isn't enabled.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 259,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Hide",
            "desc": "Hides the Cmdr window.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 271,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Toggle",
            "desc": "Toggles the Cmdr window. Does nothing if Cmdr isn't enabled.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 279,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "SetMashToEnable",
            "desc": "Enables the \"Mash to enable\" feature.\nThis feature, when enabled, requires the [activation key](#SetActivationKeys) to be pressed 5 times within a second to enable Cmdr.\nThis may be helpful to guard against mispresses from opening the window, for example.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 291,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "SetHideOnLostFocus",
            "desc": "Sets the hide on 'lost focus' feature.\nThis feature, which is enabled by default, will cause Cmdr to [hide](#Hide) when the user clicks off the window.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 300,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "SetPlaceName",
            "desc": "Sets the place name label on the interface. This is useful for a quick way to tell what game you're playing in a universe game.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 308,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "HandleEvent",
            "desc": "Sets the [network event handler](/docs/networkeventhandlers) for a certain event type.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "callback",
                    "desc": "",
                    "lua_type": "(...any) -> ()"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 317,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "Registry",
            "desc": "Refers to the command Registry.",
            "lua_type": "Registry",
            "readonly": true,
            "source": {
                "line": 53,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Dispatcher",
            "desc": "Refers to the command Dispatcher.",
            "lua_type": "Dispatcher",
            "readonly": true,
            "source": {
                "line": 62,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Util",
            "desc": "Refers to a table containing many useful utility functions.",
            "lua_type": "Util",
            "readonly": true,
            "source": {
                "line": 71,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Gui",
            "desc": "Refers to the current Cmdr GUI.",
            "lua_type": "ScreenGui",
            "readonly": true,
            "source": {
                "line": 80,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Toggled",
            "desc": "A signal that fires when the Cmdr window is toggled.",
            "lua_type": "{ Connect: (self: Toggled, callback: (visible: boolean) -> ()) -> RBXScriptConnection, Fire: (self: Toggled, visible: boolean) -> () }",
            "readonly": true,
            "source": {
                "line": 89,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "_interface",
            "desc": "Refers to the CmdrInterface object.",
            "lua_type": "CmdrInterface",
            "private": true,
            "readonly": true,
            "source": {
                "line": 99,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "_replicatedRoot",
            "desc": "Refers to the CmdrClient modulescript containing all shared functionality.",
            "lua_type": "ModuleScript",
            "private": true,
            "readonly": true,
            "source": {
                "line": 109,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "_remoteEvent",
            "desc": "Refers to the CmdrEvent RemoteEvent found within CmdrClient.",
            "lua_type": "RemoteEvent",
            "private": true,
            "readonly": true,
            "source": {
                "line": 119,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "_remoteFunction",
            "desc": "Refers to the CmdrFunction RemoteFunction found within CmdrClient.",
            "lua_type": "RemoteFunction",
            "private": true,
            "readonly": true,
            "source": {
                "line": 129,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "_enabled",
            "desc": "Whether or not Cmdr is enabled (will show via the defined activation keys). Use [`CmdrClient:SetEnabled`](#SetEnabled) to change.",
            "lua_type": "boolean",
            "private": true,
            "readonly": true,
            "source": {
                "line": 139,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "_activationKeys",
            "desc": "The list of key codes that will show or hide Cmdr. Use [`CmdrClient:SetActivationKeys`](#SetActivationKeys) to change.",
            "lua_type": "{ Enum.KeyCode }",
            "private": true,
            "readonly": true,
            "source": {
                "line": 149,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "_activationUnlocksMouse",
            "desc": "Whether or not activating the Cmdr window will unlock the mouse.",
            "lua_type": "boolean",
            "private": true,
            "readonly": true,
            "source": {
                "line": 159,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "_mashToEnable",
            "desc": "Whether or not mashing to enabled is enabled. Use [`CmdrClient:SetMashToEnable`](#SetMashToEnable) to change.",
            "lua_type": "boolean",
            "private": true,
            "readonly": true,
            "source": {
                "line": 169,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "_hideOnLostFocus",
            "desc": "Whether or not losing focus will hide the Cmdr window.",
            "lua_type": "boolean",
            "private": true,
            "readonly": true,
            "source": {
                "line": 179,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "_placeName",
            "desc": "The current place name, displayed on the interface. Use [`CmdrClient:SetPlaceName`](#SetPlaceName) to change.",
            "lua_type": "string",
            "private": true,
            "readonly": true,
            "source": {
                "line": 189,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "_events",
            "desc": "A collection of event callbacks used by Cmdr.",
            "lua_type": "{ [string]: (any) -> () }",
            "private": true,
            "readonly": true,
            "source": {
                "line": 199,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        }
    ],
    "types": [],
    "name": "CmdrClient",
    "desc": "The Cmdr client object and entry point.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 44,
        "path": "Cmdr/CmdrClient/init.luau"
    }
}