Declaration
public void OnStateEnabledChanged(Action<AvatarStateType state, bool enabled> callback)
Parameter
state | The player's state type |
enabled | True 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)