Skip to main content

HumanoidTracker

Tracks a player's character's humanoid

Properties

Humanoid

HumanoidTracker.Humanoid: ValueObject<Humanoid>

Current humanoid

AliveHumanoid

HumanoidTracker.AliveHumanoid: ValueObject<Humanoid>

Current humanoid which is alive

HumanoidDied

HumanoidTracker.HumanoidDied: Signal<Humanoid>

Fires when the humanoid dies

Functions

new

HumanoidTracker.new(playerPlayer) → HumanoidTracker

Tracks the player's current humanoid

tip

Be sure to clean up the tracker once you're done!

PromiseNextHumanoid

HumanoidTracker:PromiseNextHumanoid() → Promise<Humanoid>

Returns a promise that resolves when the next humanoid is found. If a humanoid is already there, then returns a resolved promise with that humanoid.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Tracks the player's current humanoid\n\n:::tip\nBe sure to clean up the tracker once you're done!\n:::",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "HumanoidTracker"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 45,
                "path": "src/humanoidtracker/src/Shared/HumanoidTracker.lua"
            }
        },
        {
            "name": "PromiseNextHumanoid",
            "desc": "Returns a promise that resolves when the next humanoid is found.\nIf a humanoid is already there, then returns a resolved promise\nwith that humanoid.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<Humanoid>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 88,
                "path": "src/humanoidtracker/src/Shared/HumanoidTracker.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "Humanoid",
            "desc": "Current humanoid",
            "lua_type": "ValueObject<Humanoid>",
            "source": {
                "line": 23,
                "path": "src/humanoidtracker/src/Shared/HumanoidTracker.lua"
            }
        },
        {
            "name": "AliveHumanoid",
            "desc": "Current humanoid which is alive",
            "lua_type": "ValueObject<Humanoid>",
            "source": {
                "line": 29,
                "path": "src/humanoidtracker/src/Shared/HumanoidTracker.lua"
            }
        },
        {
            "name": "HumanoidDied",
            "desc": "Fires when the humanoid dies",
            "lua_type": "Signal<Humanoid>",
            "source": {
                "line": 35,
                "path": "src/humanoidtracker/src/Shared/HumanoidTracker.lua"
            }
        }
    ],
    "types": [],
    "name": "HumanoidTracker",
    "desc": "Tracks a player's character's humanoid",
    "source": {
        "line": 5,
        "path": "src/humanoidtracker/src/Shared/HumanoidTracker.lua"
    }
}