Input.GetKeyDown(KeyCode.F)/need to press several times to activate

I have this Code
void OnTriggerStay2D(Collider2D other)
{

//for showing dialog
if (other.gameObject.name == “Player” && Input.GetKeyDown(KeyCode.F))
{
Interact = false;
dMan.ShowBox(dialog);
Debug.Log(“Up”);
}
}

To make my dialog popup, i always need to press F several times. Anyone know why?
I saw that some people use neverSleep in Rigidbody at the Player, but this doesnt work for me…

Put Interact into condition as a hack. Or place the object into another coords on condition. Try Unity - Scripting API: MonoBehaviour.OnTriggerEnter2D(Collider2D) (unity3d.com) Input.GetKeyDown(KeyCode.F) must be in Update.

still wont wwork, maybe input manager settings are wrong? Gravity, Sensivity?

Use tags better than other.gameObject.name

same with tags, need to press several times … :frowning:

Would you like to use GameObject (click editor menu) with Mesh Renderer, Text Mesh and BoxCollider2d (+text mesh component in the inspector)?

void OnMouseDown()
{
         / /process
}

What is Player and why you need other object to just press F?
What is the logic with Player and F?
Player is a first person?

i found out the porblem, in my update i had if(f=Input.GetKeyUp(KeyCode.F)), then i changed it to this and it worked
void Update()
{
if(Input.GetKeyUp(KeyCode.F))
{
f = true;
}
}