Players Bullets affect trigger.

Aliright I made a script which when the player hits it it turns something off and another when it hits turns it back on here is the script. (Both similar just false/true is different

using UnityEngine;
using System.Collections;

public class BuildingExitEnterFalse : MonoBehaviour {
public GameObject BuildingTop;
public GameObject Player;

void OnTriggerEnter(Collider other) 
    {
        if(Player)
    {
        BuildingTop.SetActiveRecursively(false);

    }
}
}

It works as it should but if my player shoots and the bullets hit the collider it occurs which is VERY bad. I tired this but it didnt work

using UnityEngine;
using System.Collections;

public class BuildingExitEnterFalse : MonoBehaviour {
public GameObject BuildingTop;
public GameObject Player;
public GameObject PistolBullet;

void OnTriggerEnter(Collider other) 
    {
        if(Player)
    {
        BuildingTop.SetActiveRecursively(false);
    }
        if(PistolBullet)
    {
        Destroy(PistolBullet);
    }
}
}

Any suggestions?

And if this helps here is the script that spawns the bullet

void PistolShoot ()
{
    tempVector = Quaternion.AngleAxis(8f, Vector3.up) * inputRotation;
                    tempVector = (transform.position + (tempVector.normalized * 0.8f));
                    GameObject objCreatedPistolBullet = (GameObject) Instantiate(ptrScriptVariable.objPistolBullet, tempVector, Quaternion.LookRotation(inputRotation) ); // create a bullet, and rotate it based on the vector inputRotation
                    Physics.IgnoreCollision(objCreatedPistolBullet.collider, collider);
                    VariableScript.pistolammo -= 1;
                    print("ammo is now: "+VariableScript.pistolammo);
                    GameObject.Find("g_Ammocounter").guiText.text = ""+VariableScript.pistolammo;
            }

Well I suggest you format with

if()
{
    //Code
}

rather then

if()

{

}

It helps a lot for the readability of the code.

Also you should not write two scripts for this functionality.

Example: Script one can interact with a specific object based on a collision AND turn it on Script two can interact with the same object based on a collision AND turn it off

The similarity is as you said, very big. So that should set off an alarm, can't I just make it do both? The answer is yes. Code duplication can quickly get out of hand and make a mess.

Use a bool to keep track of the state of the object (Give the object a property) Check the property to see what state the object is in.

If the object is in OFF state and a collision occured, swap to ON If the object is in ON state and a collision occured, swap to OFF

2 scripts in one

You should use `if(other.tag=="Player")` instead of `if(Player)`. The latter code snippet only checks to see that Player is not null, it does not check to see if other is Player. You would obviously need to set the tags appropriately. You could check for the bullet with `if(other.tag=="Bullet")` or something like that. Also, as stated by Proclyon, putting the two scripts into one is a good idea.