I'm playing on a 1.12.2 version and I'm looking for a (light) way to delete a block (well replace it by air I guess) if a player right click on it (no matter if the player has an item on hand or not).
I have seen so much talking (carot stick, scoreboard etc) and ideas everywhere than I'm totally lost now. I succeeded to replace a block if the player is near it (/execute @a ~ ~ ~ fill ~-1 ~-1 ~-1 ~1 ~1 ~1 minecraft:air 0 replace minecraft:dirt), but it is not exactly what I'm looking for.
I will appreciate a lot some help.
Thank you in advance.