FindWithTag("Player") is not an instance reference

So, I’m pretty sure that Player is a type in Unity, but I am receiving this error for this bit of code.

gameObject.FindWithTag("Player")

The method FindWithTag is a static function, which means you cannot use an instance to call it. gameObject is an instance of the GameObject to which your script is attached.

The correct way is:

GameObject.FindWithTag("Player")

Thank you for the reply. I thought that it was trying to tell me that Player was an instance.

bro this was a life saver I thought there was no way of doing it and was so close to giving up ty so much