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

StateEnabledChanged

The StateEnableChanged event fires when Humanoid/SetStateEnabled is called on the Humanoid.

Parameters include the Enum/HumanoidStateType in question along with a bool indicating if this state is now enabled.

See also

  • To find if a state is currently enabled, use Humanoid/GetStateEnabled
  • To listen to Humanoid state changes use Humanoid/StateChanged

Parameters

Name Type Default Description

The Enum/HumanoidStateType for which the enabled state has been changed

True if the state is now enabled


Code Samples


Humanoid State Change Detector

When a humanoid state changes for the Players/LocalPlayer, the code below prints whether the state has been enabled or disabled.

This code should work as expected when placed in a LocalScript.