Lerp Not working

I made this script to move my camera up and down smoothly but the lerp is not working. Here is my code:

using UnityEngine;
using System.Collections;

public class Move : MonoBehaviour {
public Transform startMarker;
public Transform endMarker;
public float speed = 100.0F;
private float startTime;
private float journeyLength;
public float up = 0.0f;
public AudioClip audioClip;
void PlaySound(int clip)

GetComponent().clip = audioClip[clip];


// Use this for initialization
void Start () {
startTime = Time.time;


// Update is called once per frame
void Update () {
 if (Input.GetKeyDown(KeyCode.S)){
    transform.position = Vector3.Lerp(transform.position, endMarker.position, speed);
up = 0.0f;
if (Input.GetKeyDown(KeyCode.W)){

	transform.position = Vector3.Lerp(transform.position, startMarker.position,speed);
up = 1.0f;

if (up == 1.0f){
if (Input.GetKeyDown(KeyCode.E))
if(GetComponent<Light>().enabled == false)

GetComponent<Light>().enabled = true;
GetComponent<AudioSource>().Play ();
GetComponent<Light>().enabled = false;

GetComponent().Play ();



Any help would be greatly appreciated

The third argument for Lerp is a float from 0 to 1. You are passing speed, but it should be a variable that increments every update depending on that speed.

Vector3 Lerp(Vector3 a, Vector3 b, float t);

When t = 0 returns a. When t = 1 returns b. When t = 0.5 returns the point midway between a and b.

*Please, format your code with the ‘101010 Code Sample’ button so your question is more readable.