Testing to see if a player is holding no item in hand

Testing to see if a player is holding no item in hand - Person Using a Blood Glucose Meter

I am trying to test to see if a player is holding nothing in their hand, so when you activate a sign (Wall Weapon, in my case) They are given a gun as long as they aren't holding anything. I have looked online for a while, and I really don't know how to Do this myself. If you know how to clear ONLY the item the player is holding, that is just as helpful. Thanks!






Pictures about "Testing to see if a player is holding no item in hand"

Testing to see if a player is holding no item in hand - A Man Holding a Basketball
Testing to see if a player is holding no item in hand - Person Applying Liquid Lipstick on Her Arm
Testing to see if a player is holding no item in hand - Hand Holding Item with Clouds in Background





[1.17] How to Detect If a Player Is Holding a Named Item




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

Images: Artem Podrez, Kampus Production, Karolina Grabowska, Disha Sheta