Transform not changing during play

I’m trying to get a bird to fly in my scene. I can get it to move but when my game is run its not starting on the y position i set in my transform. I want my Y transform to be off the plane and I set it in the inspector but when its run it defaults back to 0. how can i solve this?

here is a copy for the script i’m using to move the object.
using UnityEngine;
using System.Collections;

public class FlyAI : MonoBehaviour {

public float horizontalSpeed;
public float verticalSpeed;
public float amplitude;

public Vector3 tempPosition;

// Use this for initialization
void Start () {
	tempPosition = transform.position;
}

// Update is called once per frame
void Update () {

	tempPosition.z += horizontalSpeed;
	tempPosition.y = Mathf.Sin (Time.realtimeSinceStartup * verticalSpeed) * amplitude;
	transform.position = tempPosition;

}

}

That is because you override the transorm.position with temPosition in the update function.

An easy fix would be to introduce a float startHeight, set it in the start function and add it to tempPosition.y in the update function.

public float horizontalSpeed;
 public float verticalSpeed;
 public float amplitude;
 public Vector3 tempPosition;
 private float startHeight;
 // Use this for initialization
 void Start () {
     tempPosition = transform.position;
     startHeight = tempPosition.y;
 }
 
 // Update is called once per frame
 void Update () {
     tempPosition.z += horizontalSpeed;
     tempPosition.y = Mathf.Sin (Time.realtimeSinceStartup * verticalSpeed) * amplitude + startHeight;
     transform.position = tempPosition;
 
 }