Object turns black once it hits Wall, How do I fix it?,Alien Changes to black once it hits solid tagged wall.

I have made an Alien Object that will turn once it hit a solid wall (With the script below), and I’ve made a material for lightening effects, however the alien turns black inside the game once it hits the wall.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LookForward : MonoBehaviour {
public Transform sightStart, sightEnd;
public bool needsCollision = false;

private bool collision;
private Vector2 localscale;
// Use this for initialization
void Start () {
	localscale = new Vector3 (1, 1, 1);
}

// Update is called once per frame
void Update () {
	collision = Physics2D.Linecast(sightStart.position, sightEnd.position, 1 << LayerMask.NameToLayer("Solid"));
	Debug.DrawLine (sightStart.position, sightEnd.position, Color.green);

	if (collision == needsCollision) {
		localscale = new Vector3 (transform.localScale.x == 1 ? -1 : 1, transform.localScale.y, transform.localScale.z);
		transform.localScale = localscale;
	}
}

Before Going Dark
After Going Dark

I would assume because it’s flipping the object normals without compensating for it. An easy way to fix this would be to replace the line;

localscale = new Vector3 (transform.localScale.x == 1 ? -1 : 1, transform.localScale.y, transform.localScale.z);

with;

localscale = new Vector3 (transform.localScale.x == 1 ? -1 : 1, transform.localScale.y, transform.localScale.z == 1 ? -1 : 1);

By flipping the z scale, you are also flipping the object normals, which should in theory fix the problem. I don’t see the issue being caused by anything else.