Skip to main content

Client

This package contains methods and attributes involved with pure client-sided components.

Package Attribute Value
__singleton true
__domain local

Properties

Client

Client.Client: Player

Returns the Player object for the client. Equivalent to game.Players.LocalPlayer.

PlayerGui

Client.PlayerGui: PlayerGui

Returns the PlayerGui of the client.

Functions

BindMouseLock

Client:BindMouseLock(keystring) → ()

Change the MouseLock keybind for the client. A complete list of all the keys can be found here.

DisableControls

Client:DisableControls() → ()

Disable control for the client character.

EnableControls

Client:EnableControls() → ()

Re-enable control for the client character.

GetCharacter

This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. Yields
Client:GetCharacter(waitForboolean) → Model,Humanoid,Part | nil

Performs appropriate checks to see if the client character exists and if it does, returns the character Model, Humanoid, and the HumanoidRootPart. Returns nil if the character doesn't exist and waitFor isn't set to true.

Show raw api
{
    "functions": [
        {
            "name": "BindMouseLock",
            "desc": "Change the MouseLock keybind for the client. A complete list of all the keys can be found [here](https://create.roblox.com/docs/reference/engine/enums/KeyCode).",
            "params": [
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 30,
                "path": "src/essentials/Client.lua"
            }
        },
        {
            "name": "DisableControls",
            "desc": "Disable control for the client character.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 53,
                "path": "src/essentials/Client.lua"
            }
        },
        {
            "name": "EnableControls",
            "desc": "Re-enable control for the client character.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 64,
                "path": "src/essentials/Client.lua"
            }
        },
        {
            "name": "GetCharacter",
            "desc": "Performs appropriate checks to see if the client character exists and if it does, returns the character `Model`, `Humanoid`, and the `HumanoidRootPart`. Returns `nil` if the character doesn't exist and `waitFor` isn't set to `true`.",
            "params": [
                {
                    "name": "waitFor",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Model, Humanoid, Part | nil"
                }
            ],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 78,
                "path": "src/essentials/Client.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "Client",
            "desc": "Returns the [Player] object for the client. Equivalent to `game.Players.LocalPlayer`.",
            "lua_type": "Player",
            "source": {
                "line": 111,
                "path": "src/essentials/Client.lua"
            }
        },
        {
            "name": "PlayerGui",
            "desc": "Returns the [PlayerGui] of the client.",
            "lua_type": "PlayerGui",
            "source": {
                "line": 117,
                "path": "src/essentials/Client.lua"
            }
        }
    ],
    "types": [],
    "name": "Client",
    "desc": "This package contains methods and attributes involved with pure client-sided components.\n\n| Package Attribute | Value |\n| --- | --- |\n| __singleton | true |\n| __domain | local |",
    "source": {
        "line": 105,
        "path": "src/essentials/Client.lua"
    }
}