Declaration
public void SetStateEnabled(AvatarStateType state, bool enabled)
Parameter
state | The AvatarStateType to be enabled or disabled. |
enabled | True if this state is to be enabled, false if it is to be disabled. |
Descriptions
This function sets whether a given AvatarStateType is enabled for the player.
local player = ParaPlayerService.GetLocalPlayer()
player:OnStateEnabledChanged(function(state, enable)
print(state)
print(enable)
end)
player:SetStateEnabled(AvatarStateType.Dead, false)