resizing foliage

I am writing a script that will change a plants size and rotation based on a variable that the player can change, I wrote it so that I could attach it to the plants prefab and then it would work automatically at start, it worked perfect at first but then I just tried to change an objects y scale to make it taller but that made it so that everything dissapears, I am 100% sure without a doubt that it is the first 3 if statements in Start() but I am not that good with Vector3’s so I do not know how else to change only the x y and z coordinates.

using UnityEngine;
using System.Collections;

public class RandomFlowerSize : MonoBehaviour {

    //The flower we will manipulate.
    [Header("Object To Manipulate")]
    public GameObject objectToChange;

    //Allows you to change sizes and shapes and rotations of the game object.
    [Header("What values should be changed")]
    public bool sizeX = true;
    public bool sizeY = true;
    public bool sizeZ = true;

    public bool rotateX = true;
    public bool rotateY = true;
    public bool rotateZ = true;

    [Header("Rotation values")]
    [Range(0, 360)]
    public float xRotation = 10f;

    [Range(0, 360)]
    public float yRotation = 10f;

    [Range(0, 360)]
    public float zRotation = 10f;

    //Variable that control the flowers min and max size.
    [Header("Size values")]
    [Range(0, 1)]
    public float minXSize = 0.4f;
    [Range(0, 2)]
    public float maxXSize = 1.0f;

    [Range(0, 1)]
    public float minYSize = 0.4f;
    [Range(0, 2)]
    public float maxYSize = 1.0f;

    [Range(0, 1)]
    public float minZSize = 0.4f;
    [Range(0, 2)]
    public float maxZSize = 1.0f;

    void Start () {

        if (sizeX == true) {
            var randomXSize = Random.Range(minXSize, maxXSize);
            objectToChange.transform.localScale = new Vector3 (randomXSize, 0, 0);
        }

        if (sizeX == true) {
            var randomYSize = Random.Range(minYSize, maxYSize);
            objectToChange.transform.localScale = new Vector3(0, randomYSize, 0);
        }

        if (sizeZ == true) {
            var randomZSize = Random.Range(minZSize, maxZSize);
            objectToChange.transform.localScale = new Vector3(0, 0, randomZSize);
        }

        if (rotateX == true) {
            var randomRotationX = Random.Range(0, xRotation);
            objectToChange.transform.Rotate(randomRotationX, 0, 0);
        }

        if (rotateY == true) {
            var randomRotationY = Random.Range(0, yRotation);
            objectToChange.transform.Rotate(0, randomRotationY, 0);
        }

        if (rotateZ == true) {
            var randomRotationZ = Random.Range(0, zRotation);
            objectToChange.transform.Rotate(0, 0, randomRotationZ);
        }
    }
}

I figured out my problem and pasted the code if anyone is interested. I would like to know if that will drastically slow my game down when it is first started when this is placed on hundreds of objects in a massive world space though.

using UnityEngine;
using System.Collections;

public class RandomFlowerSize : MonoBehaviour {

    //The flower we will manipulate.
    [Header("Object To Manipulate")]
    public GameObject objectToChange;

    //Allows you to change sizes and shapes and rotations of the game object.
    [Header("What values should be changed")]
    public bool sizeX = true;
    public bool sizeY = true;
    public bool sizeZ = true;

    public bool rotateX = true;
    public bool rotateY = true;
    public bool rotateZ = true;

    [Header("Rotation values")]
    [Range(0, 360)]
    public float xRotation = 10f;

    [Range(0, 360)]
    public float yRotation = 10f;

    [Range(0, 360)]
    public float zRotation = 10f;

    //Variable that control the plants min and max size.
    [Header("Size values")]
    [Range(0, 1)]
    public float minSize = 0.4f;
    [Range(0, 2)]
    public float maxSize = 1.0f;

    //Objects default X Y and Z values.
    private float changeXSize = 1;
    private float changeYSize = 1;
    private float changeZSize = 1;

    [HideInInspector]
    Vector3 objectVector = new Vector3(1, 1, 1);

    void Start () {
        //Set the default size values to what the object is scaled to.
        objectVector = objectToChange.transform.localScale;

        //Generates numbers based on the X Y and Z min and max values.
        var randomSize = Random.Range(minSize, maxSize);

        //Sets the new X Y and Z values.
        if (sizeX == true) {
            changeXSize = randomSize;
        }
        else {
            changeXSize = objectVector.x;
        }

        if (sizeY == true) {
            changeYSize = randomSize;
        }
        else {
            changeYSize = objectVector.y;
        }

        if (sizeZ == true) {
            changeZSize = randomSize;
        }
        else {
            changeZSize = objectVector.z;
        }

        //Changes the new X Y and Z values.
        objectToChange.transform.localScale = new Vector3 (changeXSize, changeYSize, changeZSize);

        //Rotates the object.
        if (rotateX == true) {
            var randomXRotation = Random.Range(0, xRotation);
            objectToChange.transform.Rotate(randomXRotation, 0, 0);
        }

        if (rotateY == true) {
            var randomYRotation = Random.Range(0, yRotation);
            objectToChange.transform.Rotate(0, randomYRotation, 0);
        }

        if (rotateZ == true) {
            var randomZRotation = Random.Range(0, zRotation);
            objectToChange.transform.Rotate(0, 0, randomZRotation);
        }
    }
}