Comment on page
StatusEffectAdded
Fires when a Status Effect is added to an Entity
Example usage:
Events.StatusEffectAdded(function(event)
if (event.statusEffect == StatusEffectType.NO_KNOCKBACK) then
local player = event.entity:getPlayer()
if (player == nil) then
return
end
-- Give the player a knockback baguette
InventoryService.giveItem(player, ItemType.BAGUETTE, 1, true)
end
end)
The entity that received the status effect.
The type of status effect that was added to the entity.
Last modified 4mo ago