Skip to main content

CharacterManager

This item only works when running on the client. Client

Manager module for character-related things such as collisions, damage bricks, and boosts.

Types​

Boost​

interface Boost {
Information: {
icon: string,
color: Color3
}
Start: (boostData: BoostData) → ()
Update: (boostData: BoostData) → ()
End: (boostData: BoostData) → ()
GetMultiplier: (boostData: BoostData) → number
}

BoostData​

interface BoostData {
startTime: number
mode: string
type: string
power: number
duration: number
module: Boost
timerDecimals: boolean
hideGUI: boolean
startTweenInfo: TweenInfo
endtweenInfo: TweenInfo
infinite: boolean
multiplier: number
timeLeft: number
}

Functions​

ValidateDamageBrick​

CharacterManager:ValidateDamageBrick(brick: BasePart) → ()

Function internally used to validate a damage brick's damage value. This also checks whether the damage brick is deactivated or not.

Damage​

CharacterManager:Damage(damage: BasePart | string | number) → ()

Fires the DamageEvent with the given damage value. damage can be either a number, or a string representing a key in the VALID_DAMAGEBRICKS table.

GetHumanoid​

CharacterManager:GetHumanoid(player: Player) → Humanoid?

Returns the player's Humanoid if it exists.

ChangeHumanoidProperty​

CharacterManager:ChangeHumanoidProperty(
property: string,
value: any,
tweenInfo: TweenInfo?
) → ()

Changes the given property on the Humanoid to the given value. A TweenInfo can be provided to tween the value.

GetActiveBoost​

CharacterManager:GetActiveBoost(
boostType: string,
isPad: boolean?
) → _TDefs.BoostData?

Get a currently active boost with the given boostType. If isPad is true, it will return the currently active boost pad. Otherwise, it will return the currently active regular boost.

IsBoostInfinite​

CharacterManager:IsBoostInfinite(boostData: _TDefs.BoostData) → boolean

Returns whether a given boost should be infinite or not. Boosts with a duration of 0 or below, or higher than 10^10 are considered infinite and will never run out unless removed by a boost remover.

GetBoostModule​

CharacterManager:GetBoostModule(boostType: string) → _TDefs.Boost?

Gets the boost module for the specified boost type.

RegisterCustomBoost​

CharacterManager:RegisterCustomBoost(
boostType: string,
boostData: _TDefs.Boost
) → ()

Registers a custom boost with the given type and data. After registering, custom boosts can be used in Boosters. Custom boosts will be unregistered when the character respawns.

StartBoost​

CharacterManager:StartBoost(boostData: _TDefs.BoostData) → ()

Starts a boost with the given boost data. If a boost with the given type is already active, the already active boost will be refreshed instead of a new boost being started.

RemoveBoost​

CharacterManager:RemoveBoost(boostData: _TDefs.BoostData) → ()

Ends the given boost.

GetActiveBoosts​

CharacterManager:GetActiveBoosts() → {_TDefs.BoostData}

Returns a table containing the currently active boosts.

Show raw api
{
    "functions": [
        {
            "name": "ValidateDamageBrick",
            "desc": "Function internally used to validate a damage brick's damage value.\nThis also checks whether the damage brick is deactivated or not.",
            "params": [
                {
                    "name": "brick",
                    "desc": "",
                    "lua_type": "BasePart"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 102,
                "path": "mirror/Kit.Managers.CharacterManager.luau"
            }
        },
        {
            "name": "Damage",
            "desc": "Fires the DamageEvent with the given `damage` value.\n`damage` can be either a `number`, or a `string` representing a key in the\n`VALID_DAMAGEBRICKS` table.",
            "params": [
                {
                    "name": "damage",
                    "desc": "",
                    "lua_type": "BasePart | string | number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 134,
                "path": "mirror/Kit.Managers.CharacterManager.luau"
            }
        },
        {
            "name": "GetHumanoid",
            "desc": "Returns the `player`'s `Humanoid` if it exists.",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Humanoid?\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 165,
                "path": "mirror/Kit.Managers.CharacterManager.luau"
            }
        },
        {
            "name": "ChangeHumanoidProperty",
            "desc": "Changes the given `property` on the Humanoid to the given `value`.\nA `TweenInfo` can be provided to tween the value.",
            "params": [
                {
                    "name": "property",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "tweenInfo",
                    "desc": "",
                    "lua_type": "TweenInfo?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 180,
                "path": "mirror/Kit.Managers.CharacterManager.luau"
            }
        },
        {
            "name": "GetActiveBoost",
            "desc": "Get a currently active boost with the given `boostType`.\nIf `isPad` is true, it will return the currently active boost pad. Otherwise,\nit will return the currently active regular boost.",
            "params": [
                {
                    "name": "boostType",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "isPad",
                    "desc": "",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "_TDefs.BoostData?\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 213,
                "path": "mirror/Kit.Managers.CharacterManager.luau"
            }
        },
        {
            "name": "IsBoostInfinite",
            "desc": "Returns whether a given boost should be infinite or not. Boosts with a duration\nof 0 or below, or higher than 10^10 are considered infinite and\nwill never run out unless removed by a boost remover.",
            "params": [
                {
                    "name": "boostData",
                    "desc": "",
                    "lua_type": "_TDefs.BoostData"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 234,
                "path": "mirror/Kit.Managers.CharacterManager.luau"
            }
        },
        {
            "name": "GetBoostModule",
            "desc": "Gets the boost module for the specified boost type.",
            "params": [
                {
                    "name": "boostType",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "_TDefs.Boost?\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 243,
                "path": "mirror/Kit.Managers.CharacterManager.luau"
            }
        },
        {
            "name": "RegisterCustomBoost",
            "desc": "Registers a custom boost with the given type and data.\nAfter registering, custom boosts can be used in Boosters.\nCustom boosts will be unregistered when the character respawns.",
            "params": [
                {
                    "name": "boostType",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "boostData",
                    "desc": "",
                    "lua_type": "_TDefs.Boost"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 254,
                "path": "mirror/Kit.Managers.CharacterManager.luau"
            }
        },
        {
            "name": "StartBoost",
            "desc": "Starts a boost with the given boost data.\nIf a boost with the given type is already active, the already active boost will be\nrefreshed instead of a new boost being started.",
            "params": [
                {
                    "name": "boostData",
                    "desc": "",
                    "lua_type": "_TDefs.BoostData"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 279,
                "path": "mirror/Kit.Managers.CharacterManager.luau"
            }
        },
        {
            "name": "RemoveBoost",
            "desc": "Ends the given boost.",
            "params": [
                {
                    "name": "boostData",
                    "desc": "",
                    "lua_type": "_TDefs.BoostData"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 343,
                "path": "mirror/Kit.Managers.CharacterManager.luau"
            }
        },
        {
            "name": "GetActiveBoosts",
            "desc": "Returns a table containing the currently active boosts.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ _TDefs.BoostData }\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 357,
                "path": "mirror/Kit.Managers.CharacterManager.luau"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "Boost",
            "desc": "",
            "fields": [
                {
                    "name": "Information",
                    "lua_type": "{icon: string, color: Color3}",
                    "desc": ""
                },
                {
                    "name": "Start",
                    "lua_type": "(boostData: BoostData) -> ()",
                    "desc": ""
                },
                {
                    "name": "Update",
                    "lua_type": "(boostData: BoostData) -> ()",
                    "desc": ""
                },
                {
                    "name": "End",
                    "lua_type": "(boostData: BoostData) -> ()",
                    "desc": ""
                },
                {
                    "name": "GetMultiplier",
                    "lua_type": "(boostData: BoostData) -> number",
                    "desc": ""
                }
            ],
            "source": {
                "line": 27,
                "path": "mirror/Kit.Managers.CharacterManager.TypeDefs.luau"
            }
        },
        {
            "name": "BoostData",
            "desc": "",
            "fields": [
                {
                    "name": "startTime",
                    "lua_type": "number",
                    "desc": ""
                },
                {
                    "name": "mode",
                    "lua_type": "string",
                    "desc": ""
                },
                {
                    "name": "type",
                    "lua_type": "string",
                    "desc": ""
                },
                {
                    "name": "power",
                    "lua_type": "number",
                    "desc": ""
                },
                {
                    "name": "duration",
                    "lua_type": "number",
                    "desc": ""
                },
                {
                    "name": "module",
                    "lua_type": "Boost",
                    "desc": ""
                },
                {
                    "name": "timerDecimals",
                    "lua_type": "boolean",
                    "desc": ""
                },
                {
                    "name": "hideGUI",
                    "lua_type": "boolean",
                    "desc": ""
                },
                {
                    "name": "startTweenInfo",
                    "lua_type": "TweenInfo",
                    "desc": ""
                },
                {
                    "name": "endtweenInfo",
                    "lua_type": "TweenInfo",
                    "desc": ""
                },
                {
                    "name": "infinite",
                    "lua_type": "boolean",
                    "desc": ""
                },
                {
                    "name": "multiplier",
                    "lua_type": "number",
                    "desc": ""
                },
                {
                    "name": "timeLeft",
                    "lua_type": "number",
                    "desc": ""
                }
            ],
            "source": {
                "line": 56,
                "path": "mirror/Kit.Managers.CharacterManager.TypeDefs.luau"
            }
        }
    ],
    "name": "CharacterManager",
    "desc": "Manager module for character-related things such as collisions, damage\nbricks, and boosts.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 14,
        "path": "mirror/Kit.Managers.CharacterManager.luau"
    }
}