ParaPlayer.OnStateEnabledChanged

Declaration

public void OnStateEnabledChanged(Action<AvatarStateType state, bool enabled> callback)

Parameter

stateThe player's state type
enabledTrue if the state is now enabled.

Descriptions

The OnStateEnabledChanged event fires when SetStateEnabled() is called on the player

local player = ParaPlayerService.GetLocalPlayer()
player:OnStateEnabledChanged(function(state, enable)
    print(state)
    print(enable)
end)
player:SetStateEnabled(AvatarStateType.Dead, false)