Operator '!=' cannot be applied to operands of type method group and int

Here’s my code:

void OnTriggerExit2D(Collider2D other){
		grounded = false;
		gen = false;
		if (other.gameObject.GetInstanceID!=lastcollidedobject) {
			if (other.tag == "MovingPlatform") {
			
			}
			if (other.tag == "Hills" || other.tag == "MovingPlatform" && other.transform.position.y - transform.position.y < -3) {
				//
				score++;
				groundcheck = 0;
				if (other.tag == "Hills") {
					lastcollidedobject = other.gameObject.GetInstanceID ();
					//Destroy (other.gameObject);
				}

				
		
			}
		}

		
	}

GetInstanceID

Is method so you have to use parentheses ‘()’ at the end of it i.e.

         if (other.gameObject.GetInstanceID() != lastcollidedobject) {

That should do the trick.