Humanoid

Humanoid : Instance

Overview

Properties

AutoJumpEnabled

bool

Currently not supported.

Code Samples

AutoRotate

bool

Currently not supported.

Code Samples

AutomaticScalingEnabled

bool

Currently not supported.

Code Samples

CameraOffset

Vector3

The Currently not supported.

Code Samples

DisplayDistanceType

Enum.HumanoidDisplayDistanceType

The Currently not supported.

Code Samples

DisplayName

string

The Currently not supported.

Code Samples

Health

number

Health represents the current health of the character and can be affected by damage, healing, or regeneration.

Code Samples

Humanoid.Health = 0

HealthDisplayDistance

number

The Currently not supported.

Code Samples

HipHeight

number

The Currently not supported.

Code Samples

Jump

bool

The Currently not supported.

Code Samples

JumpHeight

number

The Currently not supported.

Code Samples

JumpPower

number

JumpPower property is a number value used to control the power of a humanoid character's jump.

Code Samples

Humanoid.JumpPower = 1000

MaxHealth

number

MaxHealth represent the maximum health value for humanoid character.

Code Samples

print(Humanoid.MaxHealth)

MaxSlopeAngle

number

The Currently not supported.

Code Samples

MoveDirection

Vector3

The Currently not supported.

Code Samples

PlatformStand

bool

The Currently not supported.

Code Samples

RootPart

BasePart

The Root Part of a Humanoid Character

Code Samples

print(Humanoid.RootPart)

Sit

bool

The Currently not supported.

Code Samples

WalkSpeed

number

WalkSpeed is primarily associated with the movement speed of a humanoid character or avatar in world.

Code Samples

Humanoid.WalkSpeed = 4000

WalkToPoint

Vector3

The Currently not supported.

Code Samples

HitboxType

Enum.HitboxType

HitboxType defines the type of hitbox used by the character. It can be configured via the Workspace, but runtime modification is not supported.

Code Samples

print(Humanoid.HitBoxType)

LookCameraDirection

bool

LookCameraDirection represent whether the camera should follow the direction the humanoid character faces during gameplay.

Code Samples

Humanoid.LookCameraDirection = true

DefaultBlendSpace

BlendSpace

Code Samples

Humanoid.DefaultBlendSpace = BasicBlendSpace

BlendSpace

BlendSpace

A BlendSpace plays a smoothly blended animation by interpolating between multiple animation assets based on character movement parameters such as speed and direction.

Code Samples

Humanoid.BlendSpace = BasicBlendSpace

Methods

AddAccessory

The Currently not supported.

Parameters

Instance InAccessory

Return

void

Code Samples

ApplyDescription

Change the appearance or animation by applying Humanoid Description to the current humanoid character.

Parameters

HumanoidDescription InDescription

Enum.AssetTypeVerification InAssetTypeVerification

Return

void

Code Samples

local Workspace = game:GetService("Workspace")
local HumanoidDescription = Workspace:WaitForChild("HumanoidDescription")
Humanoid:ApplyDescription(HumanoidDescription, Enum.AssetTypeVerification.Default)

ApplyDescriptionReset

The Currently not supported.

Parameters

HumanoidDescription InDescription

Enum.AssetTypeVerification InAssetTypeVerification

Return

void

Code Samples

EquipTool

EquipTool is equipped with a tool instance that has been entered.

Parameters

Instance InTool

Return

void

Code Samples

Humanoid:EquipTool(Tool)

GetAccessories

The Currently not supported.

Parameters

Return

Tuple

Code Samples

GetAppliedDescription

Returns the application applied to the current character to HumanoidDescription.

Parameters

Return

HumanoidDescription

Code Samples

local Description = Humanoid:GetAppliedDescription()

UnequipTools

The UnquipTools method unequip the tool currently equipped with the humanoid character.

Parameters

Return

void

Code Samples

Humanoid:UnequipTools()

RemoveAccessories

The Currently not supported.

Parameters

Return

void

Code Samples

TakeDamage

TakeDamage reduces the health of the humanoid character by parameter value.

Parameters

number InDamage

Return

void

Code Samples

Humanoid:TakeDamage(100)

LoadAnimation

The LoadAnimation method is used to load an animation onto a humanoid character. It allows you to specify the animation you want to use and returns the corresponding AnimationTrack object that can be played, stopped, and manipulated as needed.

Parameters

Animation InAnimation

Return

AnimationTrack

Code Samples

local Animation = Instance.new("Animation")
Animation.AnimationId = "ovdrassetid://18850100" -- WinAnimation01

local AnimationTrack = Humanoid:LoadAnimation(Animation)

AnimationTrack:Play()

ChangeState

ChangeState method changes the status of the humanoid character with the status value entered.

Parameters

Enum.HumanoidStateType StateType

Return

void

Code Samples

Humanoid:ChangeState(Enum.HumanoidStateType.Physics)

SetStateEnabled

The SetStateEnabled method is used to enable or disable a specific humanoid state type for a character. By specifying the state type and a boolean value, the method controls whether the state is active or not.

Parameters

Enum.HumanoidStateType InHumanoidStateType

bool bInEnabled

Return

void

Code Samples

Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing, false)

GetState

Returns the status of the current humanoid.

Parameters

Return

Enum.HumanoidStateType

Code Samples

print(Humanoid:GetState())

Events

ApplyDescriptionFinished

The Currently not supported.

Parameters

Code Samples

Climbing

The Climbing event is triggered when the humanoid character starts climbing. This event can be used to detect or handle behaviors specific to the climbing state.

Parameters

Code Samples

local function OnClimbing()
    print("Climbing!")
end
Humanoid.Climbing:Connect(OnClimbing)

ClusterCompositionFinished

The Currently not supported.

Parameters

Code Samples

Died

The Died event is triggered when the humanoid character's health reaches zero, indicating that the character has died. This event can be used to handle logic related to the character's death, such as respawning, recording statistics, or triggering animations.

Parameters

Code Samples

local function OnDied()
    print("Die!")
end
Humanoid.Died:Connect(OnDied)

EmoteTriggered

The Currently not supported.

Parameters

Code Samples

FallingDown

The Currently not supported.

Parameters

Code Samples

FreeFalling

The FreeFalling event is triggered when the humanoid character enters the FreeFalling state. This state typically occurs when the humanoid is in free fall, such as dropping from a height without any other active motion states. The event can be utilized to handle logic or actions associated with free falling, such as playing a free fall animation, enabling specific effects, or implementing mechanics related to falling.

Parameters

Code Samples

local function OnFreeFalling()
    print("FreeFalling!")
end		
Humanoid.FreeFalling:Connect(OnFreeFalling)

GettingUp

The Currently not supported.

Parameters

Code Samples

HealthChanged

The HealthChanged event is triggered whenever there is a change in the humanoid character's health. This event can be used to perform actions or logic related to health modifications, such as updating health bars, triggering warnings, or applying specific game mechanics connected to health changes.

Parameters

number Health

Code Samples

local function OnHealthChanged(health)
    print("HealthChanged!", health)
end		
Humanoid.HealthChanged:Connect(OnHealthChanged)

Jumping

The Jumping event is triggered when the humanoid character starts jumping. This event can be used to handle actions or logic associated with the jumping action, such as triggering animations, modifying physics-related parameters, or implementing custom game mechanics.

Parameters

Code Samples

local function OnJumping()
    print("Jumping!")
end		
Humanoid.Jumping:Connect(OnJumping)

MoveToFinished

The Currently not supported.

Parameters

Code Samples

PlatformStanding

The Currently not supported.

Parameters

Code Samples

Running

The Running event is triggered when the humanoid character begins or continues moving. This event can be used to handle actions or logic associated with the humanoid's movement. For instance, you can track their running speed or trigger animations when movement starts or stops.

Parameters

Code Samples

local function OnRunning()
    print("Running!")
end		
Humanoid.Running:Connect(OnRunning)

StateChanged

The StateChanged event is triggered when the humanoid character's state changes. This event can be used to monitor or handle behaviors associated with transitioning between different humanoid states, such as idle, running, or jumping.

Parameters

Enum.HumanoidStateType PreviousState

Enum.HumanoidStateType CurrentState

Code Samples

local function OnStateChanged(prevState, newState)
    print("StateChanged!", prevState, "->", newState)
end		
Humanoid.StateChanged:Connect(OnStateChanged)

StateEnabledChanged

The Currently not supported.

Parameters

Code Samples

Swimming

The Swimming event is triggered when the humanoid character starts swimming. This event can be used to detect or handle behaviors specific to the swimming state.

Parameters

Code Samples

local function OnSwimming()
    print("Swimming!")
end		
Humanoid.Swimming:Connect(OnSwimming)

Touched

The Currently not supported.

Parameters

Code Samples

Landed

The Landed event is triggered when a humanoid character lands on a surface after being in the air. This event can be used to execute logic or perform actions when the humanoid touches the ground, such as playing a landing animation, reducing health from fall damage, or resetting states.

Parameters

Code Samples

local function OnLanded()
    print("Landed!")
end		
Humanoid.Landed:Connect(Landed)

PlatformStandingMoving

The Currently not supported.

Parameters

Code Samples

See also

Character

Last updated