ParaPlayer.SetStateEnabled

Declaration

public void SetStateEnabled(AvatarStateType state, bool enabled)

Parameter

stateThe AvatarStateType to be enabled or disabled.
enabledTrue 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)