-- 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)
Parameters
player: | nil
Player placing the block (if placed by a player).
Position in the world the block is being placed at.