UseAbility

Fires when an entity uses an ability.

-- When a player attempts to Recall, turn them invisible for a few seconds
Events.UseAbility(function(event)
    if (event.abilityName == "recall") then
        StatusEffectService.giveEffect(event.entity, StatusEffectType.INVISIBILITY, 6)
    end
end)

Parameters

entity: Entity

The entity that used the ability.

abilityName: string | AbilityType

The ability used by the entity.

cancelled: bool [modifiable]

If set to true, the ability use will be cancelled.

Last updated