I'm facing a problem in
public class A : MonoBehaviour
private GameObject invSystem;
buttonCheck = true;
buttonCheck = false;
GetKeyDown which will only be true only once in a frame until relased and pressed again.
GetKey whill return true while it is held down. This will make it to be triggered more than once making your
if statement to be true and executed multiple times in a frame.
if (Input.GetKey (KeyCode.P)) should be replaced with