Comment on page
BlockPlace
Fires when a Player places a block
-- Fortify all blocks placed by players to Stone Brick
Events.BlockPlace(function(event)
-- Only fortify player blocks
if (not event.player) then
return
end
-- Only replace wool blocks
if not string.includes(event.blockType, "wool") then
return
end
BlockService.placeBlock(ItemType.STONE_BRICK, event.position)
SoundService.playSound(Sound.FORTIFY_BLOCK, event.position)
event.cancelled = true
end)
Player placing the block (if placed by a player).
Position in the world the block is being placed at.
The type of the block being placed
If set to true, the block place will be denied.
Last modified 4mo ago