We use cookies on this site to enhance your user experience

Setting and Getting Humanoid States

Setting and Getting Humanoid States

Sep 07 2018, 4:42 AM PST

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