raycast is hitting the wrong things

i’m using a raycast to get the gameobject its hitting but its hitting the player object itself even tho i have in the unity editor on “ground mask” that it should ignore the player

code for context:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class itemPickup : MonoBehaviour
{
public Transform camera, looking;
public LayerMask GroundMask;
public float MaxRayValue = 1f;

private GameObject holding;
// Start is called before the first frame update
void Start()
{
    
}

// Update is called once per frame
private void FixedUpdate()
{
   
}
void Update()
{
    if (Input.GetKeyDown("e"))
    {
        raycast();
    }

}

void raycast()
{
    RaycastHit hit;
    if (Physics.Raycast(camera.position, camera.forward, out hit, MaxRayValue))
    {
        Debug.DrawRay(camera.position, camera.forward, Color.yellow);
        Debug.Log(hit.transform.gameObject.name);
        holding = hit.transform.gameObject;
    }
}

}

You don’t use the ground mask in your raycast.