Right click detection on a block (No item on hand) Minecraft

Right click detection on a block (No item on hand) Minecraft - Man Standing and Making Gesture with Right Fist Touching Chest

How can I modify this code to detect a right click when right-clicking a specific block only, without any item in a player hand? This is not like others, for I am not using an Item or I am not right-clicking any object. Just a specific one like a torch, to act like a button. I can use scorebords with this though.

/scoreboard players set @e[type=ArmorStand,name=Activated] action 1 {Equipment:[{},{},{},{},{}]}
/scoreboard players set @e[type=ArmorStand,name=Activated] action 0 {Equipment:[{id:"minecraft:carpet"},{},{­},{},{}]}
/execute @e[name=Activated,score_action_min=1] ~ ~ ~ /setblock XYZ-Coordinates redstone_block
/execute @e[name=Activated,score_action=0] ~ ~ ~ /setblock Same XYZ-Coordinates air





Pictures about "Right click detection on a block (No item on hand) Minecraft"

Right click detection on a block (No item on hand) Minecraft - Board game with wooden blocks dropped and scattered on table chaotically after playing
Right click detection on a block (No item on hand) Minecraft - Wooden blocks placed in row on table
Right click detection on a block (No item on hand) Minecraft - Set of small wooden blocks scattered on table chaotically after playing tower game





Right Click Detection in Vanilla Minecraft [1.16 Command Blocks]




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: RODNAE Productions, Joshua Miranda, Joshua Miranda, Joshua Miranda