Brake Lights Script

Hello I need help.
Because I have this BrakeLights script I’m working on and I’m stumped on trying to get the script working because it says gameObject not a memeber of GameObject so can I have some help with this please?
Thank You!

#pragma strict
public var brakeLights : Material;
public var BrakeLight : GameObject[];

private var brakes : float;
var minimum : float = 0.0;
var maximum : float = 1.0;
private var LightsTime : float;
function Update () {  
if (Input.GetKey("space")== true || Input.GetKey("down")== true){
LightsTime += Time.deltaTime;
brakes = Mathf.Lerp(minimum, maximum,LightsTime*7);
}
else{
LightsTime = Time.deltaTime;
brakes = 0;
}

	if(brakes > 0.0){
	
		 brakeLights.SetFloat("_Intensity", Mathf.Abs(brakes));
	     BrakeLight.gameObject.GetComponent(Light).intensity = brakes;
}
		
		
	else{
	
		brakeLights.SetFloat("_Intensity", 0.0);
		BrakeLight.gameObject.GetComponent(Light).intensity = 0;

		}
		
}

Do you have more than brake light? You’ve defined BrakeLight as an array of objects (BrakeLight : GameObject[]), so if that’s what you intended you’ll need to address an individual element of that array.

As has been pointed out BrakesLights is an array, You cant just call a method of the type of the array and expect it to reach all members.
You have to invoke the method on each member.

An easy way to do this is with a foreach loop

eg

  foreach(GameObject individualLight: BreakLights){
       individualLight.intensity = brakes;
    }

This is very basic C# syntax. I strongly suggest you get a beginners book or tutorial on C# and work it.