Entering/Exiting Vehicles Part 2

I fixed some of the problems and

if (Input.GetButtonDown("Vehicle")&& isPlayerVisible)
        {
            Debug.Log("Driving");
            player.gameObject.SetActiveRecursively(false);
            player.gameObject.active = false;
            player.parent = exitpoint.transform;
            player.transform.localPosition = Vector3(-1.5f, 0, 0);
            exitpoint.parent = car.transform;
            exitpoint.transform.localPosition = Vector3(-1.5f, 0, 0);
           GameObject.Find("FireTruck").GetComponent<FireTruck>().enabled=true;
            PlayerCamera.enabled = false;
            CarCamera.enabled = true;
        }
        else
       {
            if (Input.GetButtonDown("Vehicle"))
            {
                Debug.Log("Driving");
                player.gameObject.SetActiveRecursively(true);
               player.gameObject.active = true;
                player.transform.parent = null;
                exitpoint.parent = car.transform;
                GameObject.Find("FireTruck").GetComponent<FireTruck>().enabled=false;
                PlayerCamera.enabled = true;
               CarCamera.enabled = false;
            }
        }

There’s another error, EnterExitVehicle.FireTruck’ is a field’ but its used like a `type’ and UnityEngine.Vector3 is a ‘type’ but used like a variable. How can I fix this?

You’re doing ‘Vector3(x, y, z)’ which is not valid, since Vector3 is a type and not a function. You want to call the constructor of the Vector3 type by doing ‘new Vector3(x, y, z)’ to create a new Vector3 with the specified parameters.

As for FireTruck: ‘GetComponent()’ needs the type of the component you want. Are you sure that you have a component called FireTruck? (remember that components are different from game objects, a gameobject is a collection of components). I cannot tell you how to fix this since it depends on the actual configuration of the GameObject and the specific components that you want to manipulate.