I am trying to make my character pickup and drop with the same key "space" in unity but since void update happens so fast then when I drop a monster then it instantly picks it up. 

```
void Update() {

    if (Input.GetKeyDown("space") /*( || Input.GetMouseButtonDown(1))*/) {

        if (map.selectedUnit.GetComponent<Unit>().carrying) {
            print("DROP space");
            map.selectedUnit.GetComponent<Unit>().carrying = false;
        }

        // pick up monster while on top of it
        else {
            for(int i = 0; i < map.monsterList.Count; i++) {
                if (map.monsterList[i].GetComponent<Monsters>().tileX == map.selectedUnit.GetComponent<Unit>().tileX &&
                    map.monsterList[i].GetComponent<Monsters>().tileY == map.selectedUnit.GetComponent<Unit>().tileY &&
                    map.occupationArray [map.monsterList[i].GetComponent<Monsters>().tileX, map.monsterList[i].GetComponent<Monsters>().tileY] == true) {
                        print("PICKUP space");
                        map.selectedUnit.GetComponent<Unit>().carrying = true;
                    }
            }
        }
    }
}

```

[![enter image description here](https://i.stack.imgur.com/3sUbm.png)](https://i.stack.imgur.com/3sUbm.png)

Is there a way to fix this or do I have to put pickup key as other key. I have been thinking if I add 1 second between each "space" key. So you can press space only once in one second and it could somehow fix this.