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)
Parameters
entity:
The entity that received the status effect.
statusEffect:
The type of status effect that was added to the entity.