Comment on page

PlayerDropItem

Fires when a player drops an item onto the ground.
Example usage:
Events.PlayerDropItem(function(event)
if (event.itemType == ItemType.TENNIS_BALL) then
event.cancelled = true
MessageService.sendInfo(event.player, "Be more careful! Those can explode!")
end
end)

Parameters

player: Player​

The player that is dropping the item.

itemType: ItemType​

The type of item being dropped by the player.

amount: number

The amount of the item being dropped by the player.

cancelled: bool [modifiable]

If set to true, the item drop event will be cancelled.