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

SetStateEnabled

This function sets whether a given 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.

Parameters

Name Type Default Description

The Enum/HumanoidStateType to be enabled or disabled

True if this state is to be enabled, false if it is to be disabled

Returns

Return Type Summary

No return


Code Samples


Jump Cooldown

The following sample will require a one second cooldown after a Humanoid has landed before it is able to jump again.

To try this sample, place it inside a LocalScript in StarterCharacterScripts|StarterPlayer.StarterCharacterScripts.