My method is called more than once.

So basically in my game to drop armor that’s on you press Q and Shift and when you press it my dropping bool turns true so my armor drop method will only be called once but its not working it still gets called 2 or more times heres the code.

public Helmet HeadGear;
 public Leggings PantsGear;
 public ChestPlate ChestGear;
 public Boots ShoeGear;
 public bool ArmorDropping;

 if (Input.GetKey(KeyCode.Q)&& Input.GetKey(KeyCode.LeftShift))
            {
            ArmorDrop();
            ArmorDropping  =  true;
        }
void ArmorDrop()
    {
        if (ArmorDropping == true)
        {
            if (HeadGear != null)
            {
                HeadGear = null;
                ArmorDropping = false;
            }
            else
            {
                if (ChestGear != null)
                {
                    ChestGear = null;
                    ArmorDropping = false;
                }
                else
                {
                    if (PantsGear != null)
                    {
                        PantsGear = null;
                        ArmorDropping = false;
                    }
                    else
                    {
                        Debug.Log("No Armor on");
                        ArmorDropping = false;
                    }
                }
            }
        }
    }

GetKey will return true for every frame that’s passed since you pressed the key. Use GetKeyDown instead, which ensures, that only the press is used.
Furthermore, the boolean ArmorDropping is useless, you can remove it, it’s set to true “after” calling the method checking it, so the first call always returned, but since you used GetKey it worked the second time :slight_smile: