Why Am I Getting Null Reference Exception?

I don’t get it. I want it to check if it finds a collider with the tag Lootable. What am I missing here? I’m so confused :\

private void FixedUpdate()
    {
        mouseRay = Camera.main.ScreenPointToRay(Input.mousePosition);
        RaycastHit rayHit;
        if (Input.GetButtonDown("Fire1"))
        {
            
            Physics.Raycast(mouseRay, out rayHit);
            if (rayHit.collider.tag.Equals("Lootable"))
            {
                print("hit");
                print(inventoryWindowShow);
                inventoryWindowShow = true;
            }
        }
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            inventoryWindowShow = false;
        }
    }

Physics.Raycast returns a bool to tell you if it actually hit anything.

As you haven’t provided the actual error, I’ll guess that the ray isn’t hitting anything and rayHit.collider is null?