Physics.IgnoreCollision Does not work no matter what?

I am just trying to get my bullets to not kill the character when they get shot from the gun. Should be easy. But its not. Physics.IgnoreCollision will just not work. Here is my whole code, Jump to generate_object_CollisionLess() for the collision part:

 using UnityEngine;
 using System.Collections;

 public class Gun_Small_Fire : MonoBehaviour
 {
public GameObject Ship;
public GameObject projectile = null;
public GameObject origin;
private Vector3 start_point;
float timeAtLastShot = 0;
float minTimeBetween2Shots = 2f;
float currentenergycompare;
float energypershot = 5;
public int IDofThisGun = 1;
public Transform ProjectileCollider;

//set the value from the inventory script. for not it will just be set in update.
public Database_ItemClass WeaponEquiped;

void Awake()
{
    //value must be filled or code doesnt work
    start_point = origin.transform.position;

}

// Use this for initialization
void Update()
{

    //if key down and minimum interval passed
    if (Input.GetKey(KeyCode.Space) && (Time.time - timeAtLastShot) >= minTimeBetween2Shots)
    {

        Attributes_SpaceShip ShipAttributes = (Attributes_SpaceShip)Ship.gameObject.GetComponent(typeof(Attributes_SpaceShip));

        for(int n = 0; n<10; n++)
        {
            if(IDofThisGun == n)
            {
                WeaponEquiped = ShipAttributes.ActiveWeaponSlot[n];
            }
        }

        projectile = WeaponEquiped.ProjectileModel;
        currentenergycompare = ShipAttributes.currentEnergy;
        minTimeBetween2Shots = WeaponEquiped.RateOfFire;

        //check if enough energy is stored. (possible problem with multiple guns. minor problem).
        if(currentenergycompare > energypershot)
        {
            timeAtLastShot = Time.time;
            ShipAttributes.currentEnergy = ShipAttributes.currentEnergy - WeaponEquiped.EnergyPerShot;
            generate_object_CollisionLess();
        
        
        }

    }

}

void generate_object_CollisionLess()
{

    //this part allows the function to adjust it starting position everytime it is fired.
    start_point = origin.transform.position;
    //core part of function
    ProjectileCollider = Instantiate(projectile, start_point, origin.transform.rotation) as Transform;

    //make bullets ignore the shooting entity
    Physics.IgnoreCollision(ProjectileCollider.GetComponent<Collider>(), Ship.GetComponent<Collider>());
}
 }

Any ideas why this might not be working. There is only one collider on the bullet, and only one collider on the shooter.

I don’t know why, but changing Projectile Collider from transform to game object solved the problem.