Skip to main content

CmdrClient

This item only works when running on the client. Client

The Cmdr client singleton 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(
selfToggled,
callback(visibleboolean) → ()
) → RBXScriptConnection,
Fire(
selfToggled,
visibleboolean
) → ()
}

A signal that fires when the Cmdr window is toggled.

Functions

SetEnabled

CmdrClient:SetEnabled(enabledboolean) → ()

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 used to toggle Cmdr.

SetActivationUnlocksMouse

CmdrClient:SetActivationUnlocksMouse(enabledboolean) → ()

Sets if activation will free the mouse.

Show

CmdrClient:Show() → ()

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

Hide

CmdrClient:Hide() → ()

within CmdrClient Hides the Cmdr window.

Toggle

CmdrClient:Toggle() → ()

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

SetMashToEnable

CmdrClient:SetMashToEnable(enabledboolean) → ()

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(enabledboolean) → ()

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(namestring) → ()

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(
namestring,
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 used to toggle Cmdr.",
            "params": [
                {
                    "name": "keys",
                    "desc": "",
                    "lua_type": "{ Enum.KeyCode }"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 237,
                "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": 245,
                "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": 253,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Hide",
            "desc": "within CmdrClient\nHides the Cmdr window.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 265,
                "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": 273,
                "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": 288,
                "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": 297,
                "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": 305,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "HandleEvent",
            "desc": "Sets the [network event handler](/docs/reference/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": 314,
                "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": "_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] = true }",
            "private": true,
            "readonly": true,
            "source": {
                "line": 149,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "_activationUnlocksMouse",
            "desc": "Whether or not acitvating 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 loosing 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 singleton and entry point.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 44,
        "path": "Cmdr/CmdrClient/init.luau"
    }
}