Collapse Sidebar


The GetStateEnabled function returns whether a Enum/HumanoidStateType is enabled for the Humanoid.

The humanoid state describes the activity the humanoid is currently doing.

When a particular Enum/HumanoidStateType is disabled, the humanoid can never enter that state. This is true regardless if the attempt to change state is made using Humanoid/ChangeState or Roblox internal humanoid code.

See also

  • For an event that fires when a humanoid state is enabled or disabled see Humanoid/StateEnabledChanged
  • To enable or disable a Humanoid state use Humanoid/SetStateEnabled


Name Type Default Description

The given Enum/HumanoidStateType


Return Type Summary

Whether the given Enum/HumanoidStateType is enabled

Code Samples

Setting and Getting Humanoid States

The code below sets the value of the Enum/HumanoidStateType|humanoid jumping state to false using Humanoid/SetStateEnabled and then retrieves and prints the value of this state (false) using Humanoid/GetStateEnabled.

local JUMPING = Enum.HumanoidStateType.Jumping

-- Set state
humanoid:SetStateEnabled(JUMPING, false)

-- Get state
print(humanoid:GetStateEnabled(JUMPING)) -- false