BlockBreak

Fires when a Player breaks a block
Events.BlockBreak(function(event)
if (not event.player) then
return
end
​
-- Only consider ceramic block breaks
if (event.blockType == ItemType.BLASTPROOF_CERAMIC) then
InventoryService.giveItem(event.player, ItemType.FIREBALL, 1, true)
end
end)

Parameters

player: Player | nil

Player who broke the block.

position: Vector3​

Position in the world the block was broken at.

blockType: ItemType​

The type of the block being placed