Open Asterune
Humanoid

Humanoid

Controls character health, movement, animation, and movement states.

Creatable
Instance.new("Humanoid")
Inherits
Instance
Replication
Standard

Behavior

Humanoid controls a character model's health, movement, and animation. Player characters contain a Humanoid. NPC models can also use a Humanoid when configured with the required character parts.

Summary

Members61
Properties29
Methods16
Events16
  • AnimationPlayed: RBXScriptSignalparallel read

    Fires when an animation track starts playing.

  • Climbing: RBXScriptSignalparallel readread only

    Fires when the Humanoid's climbing state changes.

  • Died: RBXScriptSignalparallel readread only

    Fires when Health reaches 0.

  • FallingDown: RBXScriptSignalparallel readread only

    Fires when the Humanoid's falling-down state changes.

  • FreeFalling: RBXScriptSignalparallel readread only

    Fires when the Humanoid's freefall state changes.

  • GettingUp: RBXScriptSignalparallel readread only

    Fires when the Humanoid's getting-up state changes.

  • HealthChanged: RBXScriptSignalparallel readread only

    Fires when Health changes.

  • Jumping: RBXScriptSignalparallel readread only

    Fires when the Humanoid's jumping state changes.

  • MoveToFinished: RBXScriptSignalparallel readread only

    Fires when a MoveTo request finishes.

  • PlatformStanding: RBXScriptSignalparallel readread only

    Fires when the Humanoid's platform-standing state changes.

  • Ragdoll: RBXScriptSignalparallel readread only

    Fires when the Humanoid's ragdoll state changes.

  • Running: RBXScriptSignalparallel readread only

    Fires when the Humanoid running state or speed changes.

  • Seated: RBXScriptSignalparallel readread only

    Fires when the Humanoid's seated state changes.

  • StateChanged: RBXScriptSignalparallel readread only

    Fires when the movement state changes.

  • Strafing: RBXScriptSignalparallel readread only

    Fires when the Humanoid's strafing state changes.

  • Swimming: RBXScriptSignalparallel readread only

    Fires when the Humanoid's swimming state changes.

Properties

AutoJumpEnabled

Humanoid.AutoJumpEnabled: boolean

Whether the character automatically jumps over small obstacles.

AutoRotate

Humanoid.AutoRotate: boolean

Whether the character automatically turns toward its movement direction.

BreakJointsOnDeath

Humanoid.BreakJointsOnDeath: boolean

Whether character joints are broken when the humanoid dies.

CameraOffset

Humanoid.CameraOffset: Vector3

The camera offset relative to the character's head.

CollisionType

Humanoid.CollisionType: EnumItem

The collision-box configuration used by the character.

DisplayDistanceType

Humanoid.DisplayDistanceType: EnumItem

The distance policy used for the character's name and health displays.

DisplayName

Humanoid.DisplayName: string

The display name used for the player or character.

FloorMaterial

Humanoid.FloorMaterial: EnumItem

The material of the surface currently supporting the character.

Health

Humanoid.Health: number

The current health, clamped between 0 and MaxHealth. A transition from positive health to 0 kills the humanoid and fires Died.

HealthDisplayDistance

Humanoid.HealthDisplayDistance: number

The maximum distance for the character's health display, in studs.

HealthDisplayType

Humanoid.HealthDisplayType: EnumItem

Whether the health display is always visible, hidden, or shown when damaged.

HipHeight

Humanoid.HipHeight: number

The vertical offset above the ground used to position the character.

Jump

Humanoid.Jump: boolean

Set to true to request a jump. The engine resets the property when the jump starts.

JumpHeight

Humanoid.JumpHeight: number

The requested jump height, in studs.

JumpPower

Humanoid.JumpPower: number

The jump strength used when UseJumpPower is enabled. Assignments are clamped to 0 through 1000.

MaxHealth

Humanoid.MaxHealth: number

The maximum health, clamped to at least 0. Lowering it also reduces Health if the current health exceeds the new maximum. Raising it does not heal the character.

MaxSlopeAngle

Humanoid.MaxSlopeAngle: number

The maximum walkable slope angle in degrees, clamped to 0 through 89.9.

MoveDirection

Humanoid.MoveDirection: Vector3

The read-only movement direction in world space. Returns a unit vector while moving or a zero vector when stationary.

NameDisplayDistance

Humanoid.NameDisplayDistance: number

The maximum distance for the character's name display, in studs.

NameOcclusion

Humanoid.NameOcclusion: EnumItem

The occlusion policy used for the character's name display.

PlatformStand

Humanoid.PlatformStand: boolean

Whether normal standing and movement controls are disabled. Physics continues to affect the character.

RequiresNeck

Humanoid.RequiresNeck: boolean

Whether the character requires a valid neck joint.

RigType

Humanoid.RigType: EnumItem

The character's rig layout.

RootPart

Humanoid.RootPart: BasePart? = nil

The BasePart used as the character's movement root, or nil when unavailable.

Sit

Humanoid.Sit: boolean

Whether the character is sitting. Set to false to request standing.

UseJumpPower

Humanoid.UseJumpPower: boolean

Whether jumping uses the jump-power setting rather than jump height.

WalkSpeed

Humanoid.WalkSpeed: number

The walking speed in studs per second, clamped to at least 0. A value of 0 stops walking but does not disable physics.

WalkToPart

Humanoid.WalkToPart: BasePart?

The part relative to which WalkToPoint is interpreted. Movement follows this part as it moves.

WalkToPoint

Humanoid.WalkToPoint: Vector3

The target position used by MoveTo.

Methods

ApplyDescription

Humanoid:ApplyDescription(humanoidDescription: HumanoidDescription): ()

Applies the supplied HumanoidDescription to the character.

ChangeState

Humanoid:ChangeState(state: EnumItem): ()

Requests a transition to the specified humanoid state.

EquipTool

Humanoid:EquipTool(tool: Tool): ()

Equips the supplied Tool on the character.

GetAppliedDescription

Humanoid:GetAppliedDescription(): HumanoidDescription

Returns the character's currently applied HumanoidDescription.

GetEquippedTools

Humanoid:GetEquippedTools(): table

Returns the Tools currently equipped by the character.

GetExecutionGroup

Humanoid:GetExecutionGroup(): ExecutionGroup?

Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.

GetPlayingAnimationTracks

Humanoid:GetPlayingAnimationTracks(): table

Returns an array of animation tracks currently playing on the humanoid.

GetPlayingGraphs

Humanoid:GetPlayingGraphs(): { AnimationGraphPlayer }

Returns the animation graph players currently playing on this animator.

GetState

Humanoid:GetState(): EnumItem

Returns the current Enum.HumanoidStateType value.

GetStateEnabled

Humanoid:GetStateEnabled(state: EnumItem): boolean

Returns whether the specified state is enabled.

LoadAnimation

Humanoid:LoadAnimation(animation: Animation): AnimationTrack

Loads an Animation and returns an AnimationTrack. Reuse the track to avoid repeated loading.

LoadGraph

Humanoid:LoadGraph(graph: AnimationGraph): AnimationGraphPlayer

Loads an AnimationGraph and returns an AnimationGraphPlayer.

MoveTo

Humanoid:MoveTo(location: Vector3, part: BasePart?): ()

Requests movement toward a position using WalkSpeed and collision handling. An optional part makes the target relative to that part. MoveToFinished reports success or failure. This method does not teleport the character.

SetStateEnabled

Humanoid:SetStateEnabled(state: EnumItem, enabled: boolean): ()

Enables or disables entry into the specified humanoid state.

TakeDamage

Humanoid:TakeDamage(amount: number): ()

Subtracts a nonnegative amount from Health, down to 0. Negative amounts are treated as 0. The current implementation does not check ForceField protection.

UnequipTools

Humanoid:UnequipTools(): ()

Moves the character's equipped Tools back to its Backpack.

Events

AnimationPlayed

Humanoid.AnimationPlayed: RBXScriptSignal

Fires when an animation track starts playing.

Climbing

Humanoid.Climbing: RBXScriptSignal

Fires when the Humanoid's climbing state changes.

Died

Humanoid.Died: RBXScriptSignal

Fires when Health reaches 0.

FallingDown

Humanoid.FallingDown: RBXScriptSignal

Fires when the Humanoid's falling-down state changes.

FreeFalling

Humanoid.FreeFalling: RBXScriptSignal

Fires when the Humanoid's freefall state changes.

GettingUp

Humanoid.GettingUp: RBXScriptSignal

Fires when the Humanoid's getting-up state changes.

HealthChanged

Humanoid.HealthChanged: RBXScriptSignal

Fires when Health changes. Passes the new health value.

Jumping

Humanoid.Jumping: RBXScriptSignal

Fires when the Humanoid's jumping state changes.

MoveToFinished

Humanoid.MoveToFinished: RBXScriptSignal

Fires when a MoveTo request finishes. Passes true if the destination was reached and false if the request timed out.

PlatformStanding

Humanoid.PlatformStanding: RBXScriptSignal

Fires when the Humanoid's platform-standing state changes.

Ragdoll

Humanoid.Ragdoll: RBXScriptSignal

Fires when the Humanoid's ragdoll state changes.

Running

Humanoid.Running: RBXScriptSignal

Fires when the Humanoid running state or speed changes.

Seated

Humanoid.Seated: RBXScriptSignal

Fires when the Humanoid's seated state changes.

StateChanged

Humanoid.StateChanged: RBXScriptSignal

Fires when the movement state changes. Passes the previous and new Enum.HumanoidStateType values.

Strafing

Humanoid.Strafing: RBXScriptSignal

Fires when the Humanoid's strafing state changes.

Swimming

Humanoid.Swimming: RBXScriptSignal

Fires when the Humanoid's swimming state changes.

Inherited members

Inherited47

Examples

Luau
-- Requires a character model named Guard.
local character = workspace:WaitForChild("Guard")
local humanoid = character:WaitForChild("Humanoid")
humanoid.MaxHealth = 200
humanoid.Health = 200
Luau
-- Server Script. Requires an NPC model named Guard with a Humanoid.
local Players = game:GetService("Players")
local guard = workspace:WaitForChild("Guard")
local humanoid = guard:WaitForChild("Humanoid")
local player = Players:GetPlayers()[1]
local character = player and player.Character
if character then
  humanoid:MoveTo(character:GetPivot().Position)
end

Player · Players · Model · Enum.HumanoidStateType