idk how to put a enter exit car script on my car my 2 attempt at trying to do this plz tell me how can i fix this mess i created

BCE0005: Unknown identifier: ‘Maincamera’. is the error

var car : Transform;
var player : Transform;
var exitPoint : Transform;
var doorTriggerLeft : Transform;
var MainCamera : Camera;
var CarCam : Camera;
function Start(){
function Update(){
GetComponent(CharacterController).enabled = true;
player.gameObject.SetActiveRecursively(false); = false;
CarCam.enabled = true;
Maincamera.enabled = false;
player.parent = exitPoint.transform;
exitPoint.transform.localPosition = Vector3(-0.5,0,0);
exitPoint.parent = car.transform;
exitPoint.transform.localPosition = Vector3(-0.5,0,0);
} if(Input.Getkeydown("return")){
GetComponent(CharacterController).enabled = false;

The closing “}” that is in front of the second “if” in Update is at wrong position, move it after the latest “}” to close the Update body. There’s also another error: replace “Getkeydown” with “GetKeyDown” and “Maincamera” with “MainCamera” (the language is case-sensitive so you must respect the letter case).

If you’re using Unity 4.x then you should also get rid of gameObject.SetActiveRecursively (use gameObject.SetActive instead), and delete the line “ = false;” because it’s useless since you’re already deactivating the same gameObject in the previous line.