function OnPlayerRightClick(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, CursorY, CursorZ) local world=Player:GetWorld() world:DoWithBlockEntityAt(BlockX, BlockY, BlockZ, function (a_BlockEntity) LOG(a_BlockEntity:GetBlockType()) end ) LOG("End") return false end
(Edited by xoft to add formatting)