Skip to main content

PlayerController

InternalController

An internal controller that helps with controlling/manipulating the player.

PlayerController = Axis.GetController("PlayerController")

Functions

GetPlayerModule

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
PlayerController:GetPlayerModule(
ReturnAsModuleboolean--

Should it be returned as the actual module

) → ModuleScript | {[any]any}

Returns the player's PlayerModule

DisableControls

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
PlayerController:DisableControls() → ()

Disable the player's controls

EnableControls

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
PlayerController:EnableControls() → ()

Enable the player's controls

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
PlayerController:GetCharacter() → Model

Returns the player's cahracter

Show raw api
{
    "functions": [
        {
            "name": "GetPlayerModule",
            "desc": "Returns the player's PlayerModule",
            "params": [
                {
                    "name": "ReturnAsModule",
                    "desc": "Should it be returned as the actual module",
                    "lua_type": "boolean"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ModuleScript | { [any]: any }"
                }
            ],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 24,
                "path": "Axis/Controllers/PlayerController.luau"
            }
        },
        {
            "name": "DisableControls",
            "desc": "Disable the player's controls",
            "params": [],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 38,
                "path": "Axis/Controllers/PlayerController.luau"
            }
        },
        {
            "name": "EnableControls",
            "desc": "Enable the player's controls",
            "params": [],
            "returns": [],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 48,
                "path": "Axis/Controllers/PlayerController.luau"
            }
        },
        {
            "name": "GetCharacter",
            "desc": "Returns the player's cahracter",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "function_type": "method",
            "yields": true,
            "source": {
                "line": 59,
                "path": "Axis/Controllers/PlayerController.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "PlayerController",
    "desc": "An internal controller that helps with controlling/manipulating the player.\n\n```lua\nPlayerController = Axis.GetController(\"PlayerController\")\n```",
    "tags": [
        "InternalController"
    ],
    "source": {
        "line": 14,
        "path": "Axis/Controllers/PlayerController.luau"
    }
}