healing is not being reconized in the current context. ,I'm trying to hit another object called healing and it doesn't reconize healing in the current context

public void OnCollisionEnter(Collision other)
{

    if (other.gameObject.tag == healing)
    {
        healthbar = maxHealth;
    }
    
}

I am trying to collide with the object called healing and then heal the player but healing is not being reconized in the current context.

Hey,

the issue you have is that you try to compare a string (the tag) to something called healing. But you write healing as if it was a variable or type name.

You have to tell the script that you want it to interpret it as the literal string that is written there. (Also please use CompareTag()):

if (other.gameObject.CompareTag("healing")) {
        //do stuff

As you can see i added quotation marks around healing and then it is a string and thus works.