On Friday morning, when I woke up to 97 new notifications on Facebook, I knew something was up. They turned out to be condolences over the death of actress Diahann Carroll, who played my mother on the TV show “Julia.” She was the only mother I had ever really known.

The show premiered over 50 years ago and was nominated for multiple Emmys. From the ages of 5 to 8, I played Julia’s son, Corey Baker. Julia was a groundbreaking character; she was the first African-American woman on a television series to star as a professional, rather than in the stereotypical role of a servant.

I find it funny and a bit ironic that in real life the kid who played her son grew up to become a waiter serving the crowd of celebrities I used to be among.

My parents, who were both actors, separated when I was 6 months old. Eventually my father, who didn’t approve of how I was being raised, assumed full custody. My mother moved to Europe, where she found some professional success. I believe I was 2 the last time I saw her. It was my father’s agent who thought I’d be right for a role on a new Fox TV show. I was 5.

“Julia” premiered in 1968, around the time of the Vietnam War, protests, riots and the assassination of Dr. Martin Luther King Jr. I was a black 5-year-old being raised by his single father, cast to play a 5-year-old being raised by his single mother.

The show was a huge success. There were limousines, private jets, police escorts and luxury hotels. Fans chased me around shopping malls. At the N.A.A.C.P. Image Awards, Michael Jackson asked for my autograph. I nearly fell off the stage that night, trying to escape a kiss from Diana Ross.

Not having a mother of my own to return to, I began asking Ms. Carroll if I could go home with her when we finished shooting for the day.

I loved staying with her in her Beverly Hills home, which I did a lot during the show’s first season. It was the lap of luxury, filled with elegant artwork and furniture. She had a wonderful garden where you could pick fresh fruit.

She had a daughter named Suzanne. And though I began to regard Suzanne as my real sister, the feeling was not mutual. Who could blame her? Had Ms. Carroll been my real mother, I would not have wanted to share her, either. I didn’t understand how unhappy the arrangement made Suzanne until I read Ms. Carroll’s memoir “Diahann: An Autobiography.”

“Eventually I had to confront the reason for Suzanne’s anger and begin to remove myself from Marc,” she wrote. “‘Suzie’s my real daughter,’ I explained. ‘And you’re my television son. That doesn’t mean I don’t love you very much. I do. But when the day is over, you must return to your home and I want to do to the same.’ It was such a painful moment. Marc couldn’t understand what was wrong and was terribly hurt.”

Ms. Carroll taught me to always be punctual and a person of my word, as she was. She came to the set on time for each show, completely prepared. She was polite to everyone and always careful about her diet. She would let me know if I started to get a little too pudgy. The producers would give me Bazooka bubble gum, but she would give me carob snacks that she thought were much healthier.

After three years and 86 episodes, “Julia” was canceled in 1971. The official word was that Ms. Carroll and the show’s creator, Hal Kanter, wanted to move on. The show had put a great deal of stress on Ms. Carroll. By age 9, I was being called a “has-been.”

Ms. Carroll tried to keep in touch with me, and I made a guest appearance on one of her television specials. I did sketches with Dick Van Dyke, who was one of the nicest people you could ever hope to meet, and another sketch with Bill Cosby who, well … not so nice.

With my earnings from the show, my father and I moved to a middle-class and predominantly white neighborhood in the early 1970s. I was called the N-word a handful of times. When I played Little League, the opposing team would chant, “Pitcher stinks, catcher’s worse, look at the Fudgsicle playing first.” I was playing first.

The decade after high school, I started taking acting seriously. I screen tested for “One Life to Live” with Ola Ray, a Playboy centerfold. Blair Underwood was the actor I was up against. He got the part.

In 2010 I saw him at a party I was working as a cater-waiter. Ebony magazine was honoring celebrities who had graced its covers over the years. I had been on Ebony covers. But my job for the evening was to serve and clean up after the other celebrities. Mr. Underwood and Ms. Carroll were among the honored guests. I felt embarrassed about approaching Diahann and purposely stayed out of her sight. I had thought waiting tables was a job I would do for a summer or two in my 20s. Yet that night, at age 48, and until last year, I was still waiting.

Not that there’s anything wrong with being a cater-waiter. It’s an honest profession. There are upsides. I’ve stood just feet away as Stevie Wonder, Sting, John Legend, Lady Gaga, Lenny Kravitz, Elton John and Katy Perry performed. I’ve tasted the finest foods prepared by famous chefs from around the world. Whenever I come across an entitled celebrity at one of these events, I remember how I was once one of them. I’m in the National Museum of African-American History and Culture, and the Smithsonian, part of our national archives. How many people can say that?

I ran into Ms. Carroll a handful of times over the years and she was always kind. I have acted intermittently in the years since “Julia” — “Cop Rock,” “Diff’rent Strokes,” “Sanford and Son” and “The Kid” — though less in the last 10 years.

Then in the fall of 2017, Ms. Carroll and I signed photographs next to each other at an autograph show near LAX airport. When I got there, one of the organizers informed me Diahann was suffering from dementia. This was the first I’d heard of it. There were no apparent signs as far as I could tell. She looked great as usual, in a black and gold outfit. She did not approve of what I was wearing. My sweatpants and bandanna look were not up to her standards. She was never shy about voicing her opinions to me, as a mother would.

We had a delightful time signing together. Before I left she gave me her phone number and we made plans to have dinner.

A few weeks later, I picked her up at her apartment in West Hollywood. We dined at an expensive restaurant that she suggested down the street. She looked beautiful and well turned out as always. And you better believe I dressed up this time.

Ms. Carroll enjoyed her fine wines from time to time and we shared a carafe or two that evening. She told me her cancer had come back. I showed her an old picture I found of me and Suzanne at a pool party during our “Julia” days. She asked for a copy and talked about her grandchildren. She was happy her granddaughter shared her good fashion sense.

After four divorces, she told me that marriage was overrated, but when I did find that special someone I must bring them over so that she could meet them and give her approval.

She offered career advice, suggesting I hire a publicist, reminding me that I should be proud I was one of television’s first black child stars. She also generously asked, “What can I do to help you?” When I told her I was writing a memoir, she told me to call it “Television’s First Black Child Star.”

I wanted the evening’s dinner to be my treat, but she insisted on picking up the tab. I was relieved she did, because that bill amounted to almost half my monthly rent. On the car ride back to her place, we sang along to Tony Bennett’s version of “There Will Never Be Another You” on my playlist.

After dropping her off and driving home, I realized she had put her keys in my doggie bag. I called her as soon as I found them. “You need to bring me those keys right now, young man. I can’t get into my home without them.” At 1 a.m., I drove 40 minutes back to her. When I arrived, she was in the lobby waiting for me. We hugged and kissed goodbye. That would be the last time I would see her.

The last time I spoke with Ms. Carroll on the phone, I told her I loved her. The loss has hit me hard.

“Did you wish your mother Diahann a happy Mother’s Day?” people asked me over the years. I would remind them that she wasn’t my real mother. She only played my mom on TV. I’m not quite sure at what point Ms. Carroll stopped being my mother in my mind.

And I’ve always wondered if my real mother knew I was on a groundbreaking television show where an actress played the role my real mother didn’t want. For three wonderful years, I was lucky that Diahann did.

Marc Copage lives in Los Angeles, where he is working on a memoir titled “Television’s First Black Child Star.”