Can I make it so that the camera only follows the player up and not down?

I want to make this script so that the camera only follows the player when he goes up

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FollowPlayer : MonoBehaviour {

public Transform player;
public Vector3 OffSet;

// Update is called once per frame
void Update () {
    transform.position = player.position + OffSet;
}

}

I know its small but it works, The public transform is connected to my players transform and the offset Vector3 is just the offset from the player

It sort of worked the camera doesnt follow the player anymore it just stays fixed in one position