Skip to main content

Character

This item only works when running on the client. Client

A table of utility functions for working with the Character that can be used to speed up the process of writing repository scripts for client objects.

Functions

getHitbox

Character.getHitbox(
modeHitboxModes,
paramsOverlapParams?
) → {BasePart}

Returns a static hitbox attached to the character based on the provided mode. See the documentation on hitbox modes for more information.

carryPart

Character.carryPart(
weldStateboolean,
weldToBasePart,
animationDisabledboolean
) → ()

Makes the character carry the weldTo part, welding it to the character and displaying a carry animation on the character. The carry animation manipulates the character's shoulders directly instead of using an Animation, so it should work everywhere.

If weldState is false, the character will stop carrying the part and the carry animation will stop.

getCharacter

Character.getCharacter() → ()

Returns a table of character instances, such as:

  • The Character itself
  • The Character's humanoid
  • The Character's RootPart
  • The Character's PrimaryPart

When the character respawns, all of the values will update accordingly.

Show raw api
{
    "functions": [
        {
            "name": "getHitbox",
            "desc": "Returns a static hitbox attached to the character based on the provided `mode`.\nSee [the documentation on hitbox modes](/docs/misc#hitbox-modes) for more information.",
            "params": [
                {
                    "name": "mode",
                    "desc": "",
                    "lua_type": "HitboxModes"
                },
                {
                    "name": "params",
                    "desc": "",
                    "lua_type": "OverlapParams?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ BasePart }\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 33,
                "path": "mirror/Kit.Utility.Character.luau"
            }
        },
        {
            "name": "carryPart",
            "desc": "Makes the character carry the `weldTo` part, welding it to the character\nand displaying a carry animation on the character. The carry animation\nmanipulates the character's shoulders directly instead of using an\nAnimation, so it should work everywhere.\n\nIf `weldState` is `false`, the character will stop carrying the part and\nthe carry animation will stop.",
            "params": [
                {
                    "name": "weldState",
                    "desc": "",
                    "lua_type": "boolean"
                },
                {
                    "name": "weldTo",
                    "desc": "",
                    "lua_type": "BasePart"
                },
                {
                    "name": "animationDisabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 166,
                "path": "mirror/Kit.Utility.Character.luau"
            }
        },
        {
            "name": "getCharacter",
            "desc": "Returns a table of character instances, such as:\n- The Character itself\n- The Character's humanoid\n- The Character's RootPart\n- The Character's PrimaryPart\n\nWhen the character respawns, all of the values will update accordingly.",
            "params": [],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 266,
                "path": "mirror/Kit.Utility.Character.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Character",
    "desc": "A table of utility functions for working with the Character that can be used to speed up the process of writing repository scripts for client objects.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 12,
        "path": "mirror/Kit.Utility.Character.luau"
    }
}