It's backwards. OnTriggerEnter is for an object that has a trigger collider. You'd attach the script to the sphere.
var newMat : Material;
function OnTriggerEnter (other : Collider) {
if (other.CompareTag("The Thing That Is Not The Sphere")) {
print("The thing that is not the sphere entered the sphere's trigger collider.");
other.renderer.material = newMat;
}
}
If you, like me, are looking for a C# answer to this:
public Material newMat;
public GameObject objectToChange;
void OnTriggerEnter()
{
objectToChange.GetComponent<MeshRenderer>().material = newMat;
Debug.Log("Exito");
}