Skip to main content

RootPartUtils

Utility functions involving the root part

Functions

promiseRootPart

RootPartUtils.promiseRootPart(humanoidHumanoid) → Promise<BasePart>

Given a humanoid creates a promise that will resolve once the Humanoid.RootPart property resolves properly.

info

This works around the fact that humanoid:GetPropertyChangedSignal("RootPart") does not fire when the rootpart changes on a humanoid.

Show raw api
{
    "functions": [
        {
            "name": "promiseRootPart",
            "desc": "Given a humanoid creates a promise that will resolve once the `Humanoid.RootPart` property\nresolves properly.\n\n:::info\nThis works around the fact that `humanoid:GetPropertyChangedSignal(\"RootPart\")` does not fire\nwhen the rootpart changes on a humanoid.\n:::",
            "params": [
                {
                    "name": "humanoid",
                    "desc": "",
                    "lua_type": "Humanoid"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<BasePart>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 27,
                "path": "src/characterutils/src/Shared/RootPartUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "RootPartUtils",
    "desc": "Utility functions involving the root part",
    "source": {
        "line": 5,
        "path": "src/characterutils/src/Shared/RootPartUtils.lua"
    }
}