Skip to main content

InputController

This item only works when running on the client. Client

Handles player input by managing control presets, double-tap logic, and action binding. It serves as a wrapper around ContextActionService to facilitate easy switching between different input configurations.

Functions

init

InputController:init() → ()

Initializes the InputController and sets the default control preset.

UnbindActions

InputController:UnbindActions() → ()

Unbinds all currently bound actions from ContextActionService.

SetupInputs

InputController:SetupInputs(
presetNamestring--

The name of the preset to apply.

) → ()

Binds a set of actions based on a predefined control preset. Handles standard actions and specialized double-tap actions.

Show raw api
{
    "functions": [
        {
            "name": "init",
            "desc": "Initializes the InputController and sets the default control preset.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 69,
                "path": "global/ReplicatedStorage/Scripts/Client/Player/InputController/init.luau"
            }
        },
        {
            "name": "UnbindActions",
            "desc": "Unbinds all currently bound actions from ContextActionService.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 76,
                "path": "global/ReplicatedStorage/Scripts/Client/Player/InputController/init.luau"
            }
        },
        {
            "name": "SetupInputs",
            "desc": "Binds a set of actions based on a predefined control preset.\nHandles standard actions and specialized double-tap actions.",
            "params": [
                {
                    "name": "presetName",
                    "desc": "The name of the preset to apply.",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 89,
                "path": "global/ReplicatedStorage/Scripts/Client/Player/InputController/init.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "InputController",
    "desc": "Handles player input by managing control presets, double-tap logic, and action binding.\nIt serves as a wrapper around ContextActionService to facilitate easy switching between\ndifferent input configurations.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 11,
        "path": "global/ReplicatedStorage/Scripts/Client/Player/InputController/init.luau"
    }
}