c# bullet holes appearing on collider

Hello! :slight_smile: I am making a FPS and have a sphere collider on some prefabs placed on the floor. When i shoot my gun at the collider, my bullet hole appears on the collider instead of going through it. The colliders are set to ‘Is Trigger’ and are used so that i can pick up the weapon when i am inside the (sphere) collider.

Any help appreciated :slight_smile:
Here is some code responsible fore the bullet holes:

    if (Physics.Raycast(shootPoint.position, shootDirection, out hit, range))
    {
      

        GameObject hitParticleEffect = Instantiate(hitParticles, hit.point, Quaternion.FromToRotation(Vector3.up, hit.normal));
        //hitParticleEffect.transform.SetParent(hit.transform);
        GameObject bulletHole = Instantiate(bulletImpact, hit.point, Quaternion.FromToRotation(Vector3.forward, hit.normal));
        bulletHole.transform.SetParent(hit.transform);

Looking at your code it looks like your raycast hits the sphere. Physics.Raycast has an optional parameter to use a LayerMask to only hit colliders that are on specified layers. You could create a layer for your sphere and just deselect it from mask