PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

Humanoid

Show deprecated

Humanoid

Show deprecated

The Humanoid is a special object that gives models the functionality of a character. It grants the model with the ability to physically walk around and interact with various components of a Roblox level.

Humanoids are always parented inside of a Model, and the model is expected to be an assembly of BasePart and Motor6D; the root part of the assembly is expected to be named HumanoidRootPart. It also expects a part named Head to be connected to the character’s torso part, either directly or indirectly.

By default, there are two official types of character rigs supplied by Roblox, each with their own set of rules:

R6

  • A basic character rig that uses 6 parts for limbs.
  • The Head part must be attached to a part named Torso, or the Humanoid will die immediately.
  • BodyPart appearances are applied using CharacterMesh objects.
  • Certain properties, such as Humanoid/LeftLeg and Humanoid/RightLeg, only work with R6.
  • R15

  • More complex than R6, but also far more flexible and robust.
  • Uses 15 parts for limbs.
  • The Head part must be attached to a part named UpperTorso or the Humanoid will die immediately.
  • BodyPart appearances have to be assembled directly.
  • Can be dynamically rescaled by using special NumberValue objects parented inside of the Humanoid.
    • The Humanoid will automatically create Vector3Value objects named OriginalSize inside of each limb.
    • If a NumberValue is parented inside of the Humanoid and is named one of the following, it will be used to control the scaling functionality:
      • BodyDepthScale
      • BodyHeightScale
      • BodyWidthScale
      • HeadScale
  • Properties

    bool

    AutoJumpEnabled

    Sets whether the character will automatically jump when they hit an obstacle as a player on a mobile device.

    bool

    AutoRotate

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

    bool

    AutomaticScalingEnabled

    bool

    BreakJointsOnDeath

    Determines whether a Humanoid|Humanoid's joints break when in the Dead state

    Vector3

    CameraOffset

    An offset applied to the Camera’s subject position when its CameraSubject is set to this Humanoid.

    HumanoidCollisionType

    CollisionType

    Selects the Enum/HumanoidCollisionType for R15 and Rthro non-player characters

    HumanoidDisplayDistanceType

    DisplayDistanceType

    Controls the distance behavior of the Humanoid’s name and health display.

    Material

    FloorMaterial

    [ReadOnly] [NotReplicated]

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

    float

    Health

    [NotReplicated]

    Describes the current health of the Humanoid on the range [0, Humanoid/MaxHealth].

    float

    HealthDisplayDistance

    Used in conjunction with the Humanoid's Humanoid/DisplayDistanceType property to either determine how far a player controlling this Humanoid can see another humanoid’s health bar, or how far this Humanoid’s health displays to other viewing players.

    HumanoidHealthDisplayType

    HealthDisplayType

    Controls when the Humanoid|Humanoid's health bar is allowed to be displayed.

    float

    HipHeight

    Determines the distance off the ground the Humanoid/RootPart should be.

    bool

    Jump

    [NotReplicated]

    Whether the Humanoid is jumping. If set to true, it will cause the Humanoid to jump.

    float

    JumpHeight

    float

    JumpPower

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

    float

    MaxHealth

    The maximum value of a Humanoid|Humanoid's Humanoid/Health.

    float

    MaxSlopeAngle

    The maximum slope angle that a humanoid can walk on without slipping.
    This value is clamped between 0° and 89°.

    Vector3

    MoveDirection

    [ReadOnly] [NotReplicated]

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

    float

    NameDisplayDistance

    Used in conjunction with the Humanoid’s DisplayDistanceType property to either determine how far a player controlling this Humanoid can see another humanoid’s name, or how far this Humanoid’s name displays to other viewing players.

    NameOcclusion

    NameOcclusion

    Controls whether a Humanoid|Humanoid's name can be seen behind walls or other objects.

    bool

    PlatformStand

    Determines whether the Humanoid is currently in the PlatformStanding Enum/HumanoidStateType.

    HumanoidRigType

    RigType

    Describes whether this Humanoid is utilizing the legacy R6 character rig, or the new R15 character rig.

    BasePart

    RootPart

    [ReadOnly] [NotReplicated]

    A reference to the Humanoid|Humanoid's HumanoidRootPart.

    BasePart

    SeatPart

    [ReadOnly] [NotReplicated]

    A reference to the seat that a Humanoid is currently sitting in, if any.

    bool

    Sit

    Describes whether the Humanoid is currently sitting.

    Vector3

    TargetPoint

    Describes the 3D position where the Player controlling the Humanoid last clicked in the world while using a Tool.

    bool

    UseJumpPower

    float

    WalkSpeed

    Describes the Humanoid|Humanoid's maximum movement speed in studs/sec.

    BasePart

    WalkToPart

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

    Vector3

    WalkToPoint

    The position that a humanoid is trying to reach, after a call to Humanoid/MoveTo is made.

    Functions

    void

    AddAccessory ( Instance accessory )

    Attaches the specified Accessory to the Humanoid

    void

    ApplyDescription ( Instance humanoidDescription )

    [Yields]

    Makes the Player/Character|character's look match that of the passed in HumanoidDescription

    void

    BuildRigFromAttachments ( )

    Assembles a tree of Motor6D joints by attaching together Attachment objects in a Humanoid|Humanoid's character

    void

    ChangeState ( HumanoidStateType state )

    Causes the Humanoid to enter the given Enum/HumanoidStateType

    void

    EquipTool ( Instance tool )

    Makes the Humanoid equip the given Tool

    Array

    GetAccessories ( )

    Returns an array of Accessory|Accessories that the Humanoid is currently wearing

    Instance

    GetAppliedDescription ( )

    Returns back a copy of the Humanoid|Humanoid's cached HumanoidDescription, which describes its current look

    BodyPartR15

    GetBodyPartR15 ( Instance part )

    Limb

    GetLimb ( Instance part )

    Returns the Enum/Limb enum that is associated with the given Part

    Array

    GetPlayingAnimationTracks ( )

    Returns an array of all AnimationTrack|AnimationTracks that are currently being played on the Humanoid

    HumanoidStateType

    GetState ( )

    Returns the Humanoid|Humanoid's current Enum/HumanoidStateType

    bool

    GetStateEnabled ( HumanoidStateType state )

    Returns whether a Enum/HumanoidStateType is enabled for the Humanoid

    Instance

    LoadAnimation ( Instance animation )

    Loads an Animation onto a Humanoid, returning an AnimationTrack that can be used for playback

    void

    Move ( Vector3 moveDirection , bool relativeToCamera )

    Causes the Humanoid to walk in the given direction

    void

    MoveTo ( Vector3 location , Instance part )

    Causes the Humanoid to attempt to walk to the given location by setting the Humanoid/WalkToPoint and Humanoid/WalkToPart properties

    bool

    PlayEmote ( string emoteName )

    [Yields]
    void

    RemoveAccessories ( )

    Removes all Accessory|Accessories worn by the Humanoid

    bool

    ReplaceBodyPartR15 ( BodyPartR15 bodyPart , Instance part )

    Dynamically replaces a Humanoid body part with a different part.

    void

    SetStateEnabled ( HumanoidStateType state , bool enabled )

    Sets whether a given Enum/HumanoidStateType is enabled for the Humanoid

    void

    TakeDamage ( float amount )

    Subtracts damage from the Humanoid/Health of the Humanoid if it is not protected by a ForceField

    void

    UnequipTools ( )

    Unequips any Tool currently equipped by the Humanoid

    Events

    RBXScriptSignal

    AnimationPlayed ( Instance animationTrack )

    Fires when an AnimationTrack begins playing on the Humanoid

    RBXScriptSignal

    Climbing ( float speed )

    Fires when the speed at which a Humanoid is climbing changes

    RBXScriptSignal

    Died ( )

    Fires when the Humanoid dies

    RBXScriptSignal

    FallingDown ( bool active )

    Fires when the Humanoid enters or leaves the FallingDown Enum/HumanoidStateType

    RBXScriptSignal

    FreeFalling ( bool active )

    Fires when the Humanoid enters or leaves the Freefall Enum/HumanoidStateType

    RBXScriptSignal

    GettingUp ( bool active )

    Fires when the Humanoid enters or leaves the GettingUp Enum/HumanoidStateType

    RBXScriptSignal

    HealthChanged ( float health )

    Fires when the Humanoid|Humanoid's Humanoid/Health changes to a value equal or below the Humanoid/MaxHealth value

    RBXScriptSignal

    Jumping ( bool active )

    Fires when the Humanoid enters and leaves the Jumping Enum/HumanoidStateType

    RBXScriptSignal

    MoveToFinished ( bool reached )

    Fires when the Humanoid finishes walking to a goal declared by Humanoid/MoveTo

    RBXScriptSignal

    PlatformStanding ( bool active )

    Fires when the Humanoid enters or leaves the PlatformStanding Enum/HumanoidStateType

    RBXScriptSignal

    Ragdoll ( bool active )

    Fires when the Humanoid enters or leaves the Ragdoll Enum/HumanoidStateType

    RBXScriptSignal

    Running ( float speed )

    Fires when the speed at which a Humanoid is running changes

    RBXScriptSignal

    Seated ( bool active , Instance currentSeatPart )

    Fired when a Humanoid either sits in a Seat or VehicleSeat or gets up

    RBXScriptSignal

    StateChanged ( HumanoidStateType old , HumanoidStateType new )

    Fired when the state of the Humanoid is changed

    RBXScriptSignal

    StateEnabledChanged ( HumanoidStateType state , bool isEnabled )

    Fires when Humanoid/SetStateEnabled is called on the Humanoid

    RBXScriptSignal

    Strafing ( bool active )

    Fires when the Humanoid enters or leaves the StrafingNoPhysics Enum/HumanoidStateType

    RBXScriptSignal

    Swimming ( float speed )

    Fires when the speed at which a Humanoid is swimming in Terrain water changes

    RBXScriptSignal

    Touched ( Instance touchingPart , Instance humanoidPart )

    Fires when one of the Humanoid|Humanoid's limbs come in contact with another BasePart