How to make border for camera?

in 2d game camera follow to the player, then he go to the right.
How to make, that camera will be stoped/blocked if player go to the left?

Sorry about english. c#.

The answer is quite obvious then :

CameraTracksPlayer :

void Update () {
    if(player != null) {
        Vector3 pos = transform.position;
        
        // Make sure the camera goes only to the right
        if( player.position.x + offsetX > pos.x)
            pos.x = player.position.x + offsetX;
            
        transform.position = pos;
    }    
}

Thought, this script won’t prevent the character to go to the left.

To prevent the character to go outside the camera :

// CameraTracksPlayer

Camera cameraComponent ;
Vector3 lastValidCharacterPosition ;

void Start () {
    GameObject player_go = GameObject.FindGameObjectWithTag("Player");

    if(player_go == null) {
        Debug.LogError("Couldn't find an object with tag 'Player'!");
        return;
    }

    player = player_go.transform;

    offsetX = transform.position.x - player.position.x;
    
    cameraComponent = GetComponent<Camera>() ;
    lastValidCharacterPosition = transform.position ;
}

void Update () {
    if(player != null) {
        Vector3 pos = transform.position;
        
        if( camera.WorldToViewportPoint( player.position ).x < 0 )
            player.position = lastValidCharacterPosition ;
        
        // Make sure the camera goes only to the right
        if( player.position.x + offsetX > pos.x)
            pos.x = player.position.x + offsetX;
            
        transform.position = pos;
        
        lastValidCharacterPosition = player.position ;
    }

}