Skip to main content

Luanoid

Properties

CharacterState

Luanoid.CharacterState: EnumList<CharacterState>

Name

Luanoid.Name: string

A non-unique identifier of the Luanoid

MoveDirection

Luanoid.MoveDirection: Vector3

Describes the direction that the Luanoid is walking in, as a unit vector along the X/Z axis.

LookDirection

Luanoid.LookDirection: Vector3

Describes the direction that the Luanoid is facing, as a unit vector along the X/Z axis.

Health

Luanoid.Health: number

Describes the current health of the Luanoid.

MaxHealth

Luanoid.MaxHealth: number

Describes the maximum health of the Luanoid.

WalkSpeed

Luanoid.WalkSpeed: number

A reference to a part whose position is trying to be reached by a Luanoid.

JumpPower

Luanoid.JumpPower: number

Determines how much upwards force is applied to the Luanoid when jumping.

HipHeight

Luanoid.HipHeight: number

Describes the maximum health of the Luanoid.

MaxSlopeAngle

Luanoid.MaxSlopeAngle: number

Determines the distance off the ground the RootPart should be.

AutoRotate

Luanoid.AutoRotate: boolean

AutoRotate sets whether or not the Luanoid will automatically rotate to face in the direction they are moving in.

Jump

Luanoid.Jump: boolean

If set to true, it will cause the Luanoid to jump.

Animator

This item is read only and cannot be modified. Read Only
Luanoid.Animator: Animator

A reference to the Animator responsible assigned to the Luanoid.

CharacterController

Luanoid.CharacterController: CharacterController

A reference to the CharacterController assigned to the Luanoid.

Character

This item is read only and cannot be modified. Read Only
Luanoid.Character: Model

A model controlled by the Luanoid

Floor

Luanoid.Floor: BasePart

A reference to the Instance the Luanoid is currently standing on. If the luanoid isn't standing on anything, the value of this property will be nil. Although this property is not read-only it should only be edited by StateControllers.

FloorMaterial

This item is read only and cannot be modified. Read Only
Luanoid.FloorMaterial: Material

Describes the Material that the Luanoid is currently standing on. If the Luanoid isn’t standing on anything, the value of this property will be Air.

Mover

This item is read only and cannot be modified. Read Only
Luanoid.Mover: VectorForce

A force that is applied to the Luanoid’s RootPart to move it. Intended only for use in CharacterControllers.

Aligner

This item is read only and cannot be modified. Read Only
Luanoid.Aligner: AlignOrientation

A force that is applied to the Luanoid’s RootPart to orient it. Intended only for use in CharacterControllers.

RootPart

This item is read only and cannot be modified. Read Only
Luanoid.RootPart: BasePart

A reference to the Luanoid's HumanoidRootPart. Despite Luanoids not having Humanoids the RootPart maintains Humanoid in its name for better compatibility.

RigChanged

This item is read only and cannot be modified. Read Only
Luanoid.RigChanged: Signal<(character: Model)>

Fires after SetRig() finishes executing.

AccessoryAdded

This item is read only and cannot be modified. Read Only
Luanoid.AccessoryAdded: Signal<(accessory: Accessory | Model | BasePart)>

Fires after AddAccessory() finishes executing.

AccessoryRemoving

This item is read only and cannot be modified. Read Only
Luanoid.AccessoryRemoving: Signal<(accessory: Accessory | Model | BasePart)>

Fires after RemoveAccessory() finishes executing.

Died

This item is read only and cannot be modified. Read Only
Luanoid.Died: Signal<(isDead: boolean)>

Fires after entering or while leaving CharacterState.Dead

FreeFalling

This item is read only and cannot be modified. Read Only
Luanoid.FreeFalling: Signal<(isFreeFalling: boolean)>

Fires after entering or while leaving CharacterState.FreeFalling

HealthChanged

This item is read only and cannot be modified. Read Only
Luanoid.HealthChanged: Signal<(newHealth: number)>

Fires after Health is changed

Jumping

This item is read only and cannot be modified. Read Only
Luanoid.Jumping: Signal<(isJumping: boolean)>

Fires after entering or while leaving CharacterState.Jumping

MoveToFinished

This item is read only and cannot be modified. Read Only
Luanoid.MoveToFinished: Signal<(success: boolean)>

Fires after a promise from MoveTo() resolves.

Seated

This item is read only and cannot be modified. Read Only
unreleased
</>
Luanoid.Seated: Signal<>

StateChanged

This item is read only and cannot be modified. Read Only
Luanoid.StateChanged: Signal<(newState: CharacterState)>

Fires after the Luanoid's state is changed.

Touched

This item is read only and cannot be modified. Read Only
unreleased
</>
Luanoid.Touched: Signal<>

Destroying

This item is read only and cannot be modified. Read Only
Luanoid.Destroying: Signal<>

Fires while Destroy() is executing.

Functions

new

Luanoid.new(existingCharacter: Model) → Luanoid

Creates a new Luanoid.

Destroy

Luanoid:Destroy() → ()

Destroys the Luanoid.

SetRig

Luanoid:SetRig(rig: Model) → ()

Assigns a rigged model as the Luanoid's character.

RemoveRig

Luanoid:RemoveRig() → ()

Removes the Luanoid's current character rig.

ApplyDescription

Luanoid:ApplyDescription(
humanoidDescription: HumanoidDescription,
) → ()

Makes the character's look match that of the passed in HumanoidDescription. If no rigType is provided a new rig will not be applied. Setting HumanoidDescription.Shirt and HumanoidDescription.Pants to any negative value will have it ignore the rig's current shirt and pants rather than clearing them.

GetAppliedDescription

unreleased
</>
Luanoid:GetAppliedDescription() → HumanoidDescription

Returns HumanoidDescription which describes its current look.

BuildRigFromAttachments

Luanoid:BuildRigFromAttachments() → ()

Assembles a tree of Motor6D joints by attaching together Attachment objects in a Luanoid's character.

TakeDamage

Luanoid:TakeDamage(damage: number) → ()

Lowers the health of the Luanoid by the given positive amount.

Move

Luanoid:Move(
moveDirection: Vector3,
relativeToCamera: boolean?
) → ()

Causes the Lumanoid to walk in the given direction.

MoveTo

Luanoid:MoveTo(
location: Vector3?,
part: BasePart?,
targetRadius: number?,
timeout: number?
) → Promise<boolean>

Causes the Luanoid to attempt to walk to the given location and part. Use a timeout of 0 for no timeout. The returned promise can also be cancelled.

AddAccessory

Luanoid:AddAccessory(
accessory: Accessory | Model | BasePart,
base: (Attachment | BasePart)?,
pivot: CFrame?
) → ()

Adds an accessory to the Luanoid's character.

RemoveAccessory

Luanoid:RemoveAccessory(accessory: Accessory | Model | BasePart) → ()

Removes an accessory from the Luanoid's character.

GetAccessories

Luanoid:GetAccessories() → {(Accessory | Model | BasePart)}

Returns a list of all accessories attached to the Luanoid.

RemoveAccessories

Luanoid:RemoveAccessories() → ()

Removes all accessories from the Luanoid.

GetNetworkOwner

Luanoid:GetNetworkOwner() → Player

Returns the current player who is the network owner of the Luanoid, or nil in case of the server.

SetNetworkOwner

Luanoid:SetNetworkOwner(player: Player) → ()

Sets the given player as network owner for this Luanoid. When player is nil, the server will be the owner instead of a player.

IsNetworkOwner

Luanoid:IsNetworkOwner() → boolean

Returns if the current machine is the network owner of the Luanoid.

GetState

Luanoid:GetState() → CharacterState

Returns the Luanoid's current CharacterState.

ChangeState

Luanoid:ChangeState(state: CharacterState) → ()

Set the Luanoid to the given CharacterState.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Creates a new Luanoid.",
            "params": [
                {
                    "name": "existingCharacter",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Luanoid"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 506,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Destroy",
            "desc": "Destroys the Luanoid.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 518,
                "path": "src/init.lua"
            }
        },
        {
            "name": "SetRig",
            "desc": "Assigns a rigged model as the Luanoid's character.",
            "params": [
                {
                    "name": "rig",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 530,
                "path": "src/init.lua"
            }
        },
        {
            "name": "RemoveRig",
            "desc": "Removes the Luanoid's current character rig.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 582,
                "path": "src/init.lua"
            }
        },
        {
            "name": "ApplyDescription",
            "desc": "Makes the character's look match that of the passed in HumanoidDescription.\nIf no `rigType` is provided a new rig will not be applied. Setting\n`HumanoidDescription.Shirt` and `HumanoidDescription.Pants` to any negative\nvalue will have it ignore the rig's current shirt and pants rather than\nclearing them.",
            "params": [
                {
                    "name": "humanoidDescription",
                    "desc": "",
                    "lua_type": "HumanoidDescription"
                },
                {
                    "name": "rigType",
                    "desc": "",
                    "lua_type": "HumanoidRigType"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 604,
                "path": "src/init.lua"
            }
        },
        {
            "name": "GetAppliedDescription",
            "desc": "Returns HumanoidDescription which describes its current look.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "HumanoidDescription"
                }
            ],
            "function_type": "method",
            "unreleased": true,
            "source": {
                "line": 616,
                "path": "src/init.lua"
            }
        },
        {
            "name": "BuildRigFromAttachments",
            "desc": "Assembles a tree of Motor6D joints by attaching together Attachment objects\nin a Luanoid's character.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 626,
                "path": "src/init.lua"
            }
        },
        {
            "name": "TakeDamage",
            "desc": "Lowers the health of the Luanoid by the given positive amount.",
            "params": [
                {
                    "name": "damage",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 636,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Move",
            "desc": "Causes the Lumanoid to walk in the given direction.",
            "params": [
                {
                    "name": "moveDirection",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "relativeToCamera",
                    "desc": "",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 648,
                "path": "src/init.lua"
            }
        },
        {
            "name": "MoveTo",
            "desc": "Causes the Luanoid to attempt to walk to the given location and part. Use a\ntimeout of 0 for no timeout. The returned promise can also be cancelled.",
            "params": [
                {
                    "name": "location",
                    "desc": "",
                    "lua_type": "Vector3?"
                },
                {
                    "name": "part",
                    "desc": "",
                    "lua_type": "BasePart?"
                },
                {
                    "name": "targetRadius",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "timeout",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<boolean>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 668,
                "path": "src/init.lua"
            }
        },
        {
            "name": "AddAccessory",
            "desc": "Adds an accessory to the Luanoid's character.",
            "params": [
                {
                    "name": "accessory",
                    "desc": "",
                    "lua_type": "Accessory | Model | BasePart"
                },
                {
                    "name": "base",
                    "desc": "",
                    "lua_type": "(Attachment | BasePart)?"
                },
                {
                    "name": "pivot",
                    "desc": "",
                    "lua_type": "CFrame?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 714,
                "path": "src/init.lua"
            }
        },
        {
            "name": "RemoveAccessory",
            "desc": "Removes an accessory from the Luanoid's character.",
            "params": [
                {
                    "name": "accessory",
                    "desc": "",
                    "lua_type": "Accessory | Model | BasePart"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 771,
                "path": "src/init.lua"
            }
        },
        {
            "name": "GetAccessories",
            "desc": "Returns a list of all accessories attached to the Luanoid.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{(Accessory | Model | BasePart)}"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 787,
                "path": "src/init.lua"
            }
        },
        {
            "name": "RemoveAccessories",
            "desc": "Removes all accessories from the Luanoid.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 810,
                "path": "src/init.lua"
            }
        },
        {
            "name": "GetNetworkOwner",
            "desc": "Returns the current player who is the network owner of the Luanoid, or nil in\ncase of the server.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 824,
                "path": "src/init.lua"
            }
        },
        {
            "name": "SetNetworkOwner",
            "desc": "Sets the given player as network owner for this Luanoid. When `player` is\nnil, the server will be the owner instead of a player.",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 836,
                "path": "src/init.lua"
            }
        },
        {
            "name": "IsNetworkOwner",
            "desc": "Returns if the current machine is the network owner of the Luanoid.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 852,
                "path": "src/init.lua"
            }
        },
        {
            "name": "GetState",
            "desc": "Returns the Luanoid's current CharacterState.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "CharacterState"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 868,
                "path": "src/init.lua"
            }
        },
        {
            "name": "ChangeState",
            "desc": "Set the Luanoid to the given CharacterState.",
            "params": [
                {
                    "name": "state",
                    "desc": "",
                    "lua_type": "CharacterState"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 878,
                "path": "src/init.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "CharacterState",
            "desc": "",
            "lua_type": "EnumList<CharacterState>",
            "source": {
                "line": 35,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Name",
            "desc": "A non-unique identifier of the Luanoid\n        ",
            "lua_type": "string",
            "source": {
                "line": 46,
                "path": "src/init.lua"
            }
        },
        {
            "name": "MoveDirection",
            "desc": "Describes the direction that the Luanoid is walking in, as a unit\nvector along the X/Z axis.\n        ",
            "lua_type": "Vector3",
            "source": {
                "line": 54,
                "path": "src/init.lua"
            }
        },
        {
            "name": "LookDirection",
            "desc": "Describes the direction that the Luanoid is facing, as a unit vector\nalong the X/Z axis.\n        ",
            "lua_type": "Vector3",
            "source": {
                "line": 62,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Health",
            "desc": "Describes the current health of the Luanoid.\n        ",
            "lua_type": "number",
            "source": {
                "line": 69,
                "path": "src/init.lua"
            }
        },
        {
            "name": "MaxHealth",
            "desc": "Describes the maximum health of the Luanoid.\n        ",
            "lua_type": "number",
            "source": {
                "line": 76,
                "path": "src/init.lua"
            }
        },
        {
            "name": "WalkSpeed",
            "desc": "A reference to a part whose position is trying to be reached by a\nLuanoid.\n        ",
            "lua_type": "number",
            "source": {
                "line": 84,
                "path": "src/init.lua"
            }
        },
        {
            "name": "JumpPower",
            "desc": "Determines how much upwards force is applied to the Luanoid when\njumping.\n        ",
            "lua_type": "number",
            "source": {
                "line": 92,
                "path": "src/init.lua"
            }
        },
        {
            "name": "HipHeight",
            "desc": "Describes the maximum health of the Luanoid.\n        ",
            "lua_type": "number",
            "source": {
                "line": 99,
                "path": "src/init.lua"
            }
        },
        {
            "name": "MaxSlopeAngle",
            "desc": "Determines the distance off the ground the RootPart should be.\n        ",
            "lua_type": "number",
            "source": {
                "line": 106,
                "path": "src/init.lua"
            }
        },
        {
            "name": "AutoRotate",
            "desc": "AutoRotate sets whether or not the Luanoid will automatically\nrotate to face in the direction they are moving in.\n        ",
            "lua_type": "boolean",
            "source": {
                "line": 114,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Jump",
            "desc": "If set to true, it will cause the Luanoid to jump.\n        ",
            "lua_type": "boolean",
            "source": {
                "line": 121,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Animator",
            "desc": "A reference to the Animator responsible assigned to the Luanoid.\n        ",
            "lua_type": "Animator",
            "readonly": true,
            "source": {
                "line": 129,
                "path": "src/init.lua"
            }
        },
        {
            "name": "CharacterController",
            "desc": "A reference to the CharacterController assigned to the Luanoid.\n        ",
            "lua_type": "CharacterController",
            "source": {
                "line": 136,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Character",
            "desc": "A model controlled by the Luanoid\n        ",
            "lua_type": "Model",
            "readonly": true,
            "source": {
                "line": 144,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Floor",
            "desc": "A reference to the Instance the Luanoid is currently standing on.\nIf the luanoid isn't standing on anything, the value of this\nproperty will be nil. Although this property is not read-only it\nshould only be edited by StateControllers.\n        ",
            "lua_type": "BasePart",
            "source": {
                "line": 154,
                "path": "src/init.lua"
            }
        },
        {
            "name": "FloorMaterial",
            "desc": "Describes the Material that the Luanoid is currently standing on.\nIf the Luanoid isn’t standing on anything, the value of this\nproperty will be Air.\n        ",
            "lua_type": "Material",
            "readonly": true,
            "source": {
                "line": 164,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Mover",
            "desc": "A force that is applied to the Luanoid’s RootPart to move it.\nIntended only for use in CharacterControllers.\n        ",
            "lua_type": "VectorForce",
            "readonly": true,
            "source": {
                "line": 174,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Aligner",
            "desc": "A force that is applied to the Luanoid’s RootPart to orient it.\nIntended only for use in CharacterControllers.\n        ",
            "lua_type": "AlignOrientation",
            "readonly": true,
            "source": {
                "line": 183,
                "path": "src/init.lua"
            }
        },
        {
            "name": "RootPart",
            "desc": "A reference to the Luanoid's HumanoidRootPart. Despite Luanoids not\nhaving Humanoids the RootPart maintains Humanoid in its name for\nbetter compatibility.\n        ",
            "lua_type": "BasePart",
            "readonly": true,
            "source": {
                "line": 193,
                "path": "src/init.lua"
            }
        },
        {
            "name": "RigChanged",
            "desc": "Fires after `SetRig()` finishes executing.\n        ",
            "lua_type": "Signal<(character: Model)>",
            "readonly": true,
            "source": {
                "line": 201,
                "path": "src/init.lua"
            }
        },
        {
            "name": "AccessoryAdded",
            "desc": "Fires after `AddAccessory()` finishes executing.\n        ",
            "lua_type": "Signal<(accessory: Accessory | Model | BasePart)>",
            "readonly": true,
            "source": {
                "line": 209,
                "path": "src/init.lua"
            }
        },
        {
            "name": "AccessoryRemoving",
            "desc": "Fires after `RemoveAccessory()` finishes executing.\n        ",
            "lua_type": "Signal<(accessory: Accessory | Model | BasePart)>",
            "readonly": true,
            "source": {
                "line": 217,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Died",
            "desc": "Fires after entering or while leaving `CharacterState.Dead`\n        ",
            "lua_type": "Signal<(isDead: boolean)>",
            "readonly": true,
            "source": {
                "line": 225,
                "path": "src/init.lua"
            }
        },
        {
            "name": "FreeFalling",
            "desc": "Fires after entering or while leaving `CharacterState.FreeFalling`\n        ",
            "lua_type": "Signal<(isFreeFalling: boolean)>",
            "readonly": true,
            "source": {
                "line": 233,
                "path": "src/init.lua"
            }
        },
        {
            "name": "HealthChanged",
            "desc": "Fires after Health is changed\n        ",
            "lua_type": "Signal<(newHealth: number)>",
            "readonly": true,
            "source": {
                "line": 241,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Jumping",
            "desc": "Fires after entering or while leaving `CharacterState.Jumping`\n        ",
            "lua_type": "Signal<(isJumping: boolean)>",
            "readonly": true,
            "source": {
                "line": 249,
                "path": "src/init.lua"
            }
        },
        {
            "name": "MoveToFinished",
            "desc": "Fires after a promise from `MoveTo()` resolves.\n        ",
            "lua_type": "Signal<(success: boolean)>",
            "readonly": true,
            "source": {
                "line": 257,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Seated",
            "desc": "        ",
            "lua_type": "Signal<>",
            "unreleased": true,
            "readonly": true,
            "source": {
                "line": 265,
                "path": "src/init.lua"
            }
        },
        {
            "name": "StateChanged",
            "desc": "Fires after the Luanoid's state is changed.\n        ",
            "lua_type": "Signal<(newState: CharacterState)>",
            "readonly": true,
            "source": {
                "line": 273,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Touched",
            "desc": "        ",
            "lua_type": "Signal<>",
            "unreleased": true,
            "readonly": true,
            "source": {
                "line": 281,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Destroying",
            "desc": "Fires while `Destroy()` is executing.\n        ",
            "lua_type": "Signal<>",
            "readonly": true,
            "source": {
                "line": 289,
                "path": "src/init.lua"
            }
        },
        {
            "name": "RigParts",
            "desc": "List of parts in the current rig.\n    ",
            "lua_type": "{BasePart}",
            "private": true,
            "source": {
                "line": 369,
                "path": "src/init.lua"
            }
        },
        {
            "name": "RigMotors6Ds",
            "desc": "List of motors in the current rig.\n    ",
            "lua_type": "{Motor6D}",
            "private": true,
            "source": {
                "line": 376,
                "path": "src/init.lua"
            }
        },
        {
            "name": "MoveToPromise",
            "desc": "Promise for the current MoveTo operation.\n    ",
            "lua_type": "Promise<boolean>",
            "private": true,
            "source": {
                "line": 383,
                "path": "src/init.lua"
            }
        }
    ],
    "types": [],
    "name": "Luanoid",
    "desc": "",
    "source": {
        "line": 31,
        "path": "src/init.lua"
    }
}