PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. Instead, you should go to our new and improved documentation. You can also learn more about the future of documentation.
Collapse Sidebar

GetStateEnabled

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

Parameters

Name Type Default Description

The given Enum/HumanoidStateType

Returns

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.