Skip to main content

HumanoidUtils

Utility methods to work with Roblox humanoids.

Functions

getHumanoid

HumanoidUtils.getHumanoid(
descendantInstance--

Child of a humanoid model, like a limb

) → Humanoid?

Retrieves a humanoid from a descendant.

isHumanoidStateEnabled

HumanoidUtils.isHumanoidStateEnabled(
humanoidHumanoid,
stateTypeEnum.HumanoidStateType
) → boolean

Returns whether a humanoid state type is enabled on the humanoid.

isJumpEnabled

HumanoidUtils.isJumpEnabled(humanoidHumanoid) → boolean

Returns whether the humanoid is allowed to jump. This is true when the jumping state is enabled and the humanoid's jump strength is above zero, which is the strength Roblox reads for the humanoid's Humanoid.UseJumpPower mode.

forceUnseatHumanoid

HumanoidUtils.forceUnseatHumanoid(humanoidHumanoid) → ()

Forcefully unseats the humanoid. Useful when teleporting humanoid. Definitely a non-intuitive operation to do safely.

Show raw api
{
    "functions": [
        {
            "name": "getHumanoid",
            "desc": "Retrieves a humanoid from a descendant.",
            "params": [
                {
                    "name": "descendant",
                    "desc": "Child of a humanoid model, like a limb",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Humanoid?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 16,
                "path": "src/humanoidutils/src/Shared/HumanoidUtils.lua"
            }
        },
        {
            "name": "isHumanoidStateEnabled",
            "desc": "Returns whether a humanoid state type is enabled on the humanoid.",
            "params": [
                {
                    "name": "humanoid",
                    "desc": "",
                    "lua_type": "Humanoid"
                },
                {
                    "name": "stateType",
                    "desc": "",
                    "lua_type": "Enum.HumanoidStateType"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 36,
                "path": "src/humanoidutils/src/Shared/HumanoidUtils.lua"
            }
        },
        {
            "name": "isJumpEnabled",
            "desc": "Returns whether the humanoid is allowed to jump. This is true when the jumping state is enabled\nand the humanoid's jump strength is above zero, which is the strength Roblox reads for the\nhumanoid's [Humanoid.UseJumpPower] mode.",
            "params": [
                {
                    "name": "humanoid",
                    "desc": "",
                    "lua_type": "Humanoid"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 51,
                "path": "src/humanoidutils/src/Shared/HumanoidUtils.lua"
            }
        },
        {
            "name": "forceUnseatHumanoid",
            "desc": "Forcefully unseats the humanoid. Useful when teleporting humanoid.\nDefinitely a non-intuitive operation to do safely.",
            "params": [
                {
                    "name": "humanoid",
                    "desc": "",
                    "lua_type": "Humanoid"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 71,
                "path": "src/humanoidutils/src/Shared/HumanoidUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "HumanoidUtils",
    "desc": "Utility methods to work with Roblox humanoids.",
    "source": {
        "line": 7,
        "path": "src/humanoidutils/src/Shared/HumanoidUtils.lua"
    }
}