Jennifer Grey is revealing who got her replaced on "Friends" after an appearance during the first season.

Grey played the best friend to Jennifer Aniston's character Rachel Green, Mindy Hunter, who was simultaneously having an affair with Green's then fiancé Dr. Barry Farber DDS. The character was only referenced in the premiere episode, making way for Grey's debut in the 20th episode. In it, Mindy asks Rachel to be the maid of honor in her wedding to Barry.

"I was a fan of the show, and I got the call to do it," Grey told MediaVillage. "Then when I did it, I had such bad anxiety because they kept changing the script. It's very hard to be a guest star because you're not a part of it, and you're really trying to figure it all out. They were trying to figure out what the character was, what the scene was, and it was changing, and changing, and changing. It all made me so anxious that I could barely do it," she revealed.

Although she successfully filmed the episode, Grey admitted that she rejected an offer to return to the show in the second season.

Jennifer Grey in a pink blazer stars as Mindy Hunter and talks with her hands out to Jennifer Aniston as Rachel Green on an episode of "Friends" sitting on the orange couch

Jennifer Grey played Mindy Hunter, the former maid of honor and best friend to Jennifer Aniston's character Rachel Green. She appeared in only one episode of season one. (NBC/Courtesy Everett Collection)

‘DIRTY DANCING’ STAR JENNIFER GREY REVEALS SHE STILL CRIES WATCHING THE HIT MOVIE: 'FEELS LIKE I'M LIVING IT'

"I didn't know at the time what was going on with me," she continued. "But I had a lot of performance anxiety, and I just didn't understand at that time that I needed help in the anxiety department," she recounted of her early cameo on the show.

"Everything you do in life, especially the hard things, the really painful, difficult things, are usually the things that are the most instructive and helpful," she shared. "In life, I always learn more from things that you feel like a failure at, and the successes, you don't learn as much, although, they might be fun. But it's all a part of life."

Phoebe (Lisa Kudrow) and Joey (Matt LeBlanc) sit on the orange couch while Rachel (Jennifer Aniston) looks at Monica (Courteney Cox) during a scene from "Friends"

Friends ran for 10 seasons from 1994-2004. (NBCUniversal)

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Grey's anxiety amounted to such extremes that the "Dirty Dancing" actress started turning down roles. When she was asked to host "Saturday Night Live," Grey left the offer on the table.

"I just couldn't," she remembered. "I said 'No.' I was just too scared."

When asked to return as Mindy on "Friends," Grey had a similar experience. "When they asked me to come back, I said I couldn't," Grey said of not returning to "Friends."

Jana Marie Hupp with her brown hair pulled up in a black halter dress on the red carpet in Pasadena

The character of Mindy Hunter was recast and played by actress Jana Marie Hupp. (SGranitz/WireImage)

"They got someone else to play the role. It makes me sad that I would say no to continuing on "Friends" or doing "Saturday Night Live" because of my anxiety. The truth is, I wished I had people to help me navigate that kind of fear. But I couldn't be there until I was there."

Actress Jana Marie Hupp was cast in the role of Mindy, following Grey's decision.

Jennifer Grey in a black leather jacket and black framed glasses smiles on the red carpet

Jennifer Grey says going on "Dancing with the Stars" helped her with her performance anxiety. (Emma McIntyre/WireImage)

CLICK HERE TO GET THE FOX NEWS APP

In 2010, things changed for Grey, who tackled live television as a contestant on the dance-competition show "Dancing with the Stars."

"When I look back at "Dancing with the Stars," I'm like, 'Look what I did!' But at the time I didn't watch it because I was so busy learning the next dance that I never actually could see it. Eventually when I did look at it, it was thrilling to be able to say, 'I can't believe I did that.'"