Rebel Wilson is opening up about her decision to lose weight.

The “Senior Year” star is on the new cover of People magazine, and in the issue she shares how her desire to have kids inspired her health and fitness kick.

She recalls seeing a fertility doctor in 2019 about freezing her eggs; the doctor informed her it would be easier if she lost weight.

“He looked me up and down and said, ‘You’d do much better if you were healthier,'” she says.

READ MORE: Rebel Wilson Talks About Her ‘Fantasy’ Of Going Back To High School

“I was taken aback. I thought, Oh God, this’s guy’s so rude. He was right,” Wilson continues. “I was carrying around a lot of excess weight. It’s almost like I didn’t think of my own needs. I thought of a future child’s needs that really inspired me to get healthier.”

She eventually lost over 80 pounds, though she says, “It wasn’t a goal to get to a certain weight. It was just being the healthiest version of myself.”

Wilson also explains that losing weight wasn’t just about eating right or working out, but also addressing her mental state.

“It was about dealing with the emotional issues that caused me to emotionally eat, and that’s a process,” she says. “You cry a lot, analyze things. I’d never done that before. It’s really hard to know why you don’t feel worthy when people look at my life on paper and say you’ve done all these amazing things. That’s what I’m trying to overcome.”

READ MORE: Rebel Wilson Reveals She’s ‘Happily In A Relationship’

Despite the significant weight loss, Wilson has always seen herself as an advocate for body positivity, even with her fan-favourite role in the “Pitch Perfect” series.

“Fat Amy was probably the most favourite character I’ve ever played,” she says. “I loved representing and I was so confident. But at the same time, I did feel at times insecure. Sometimes it’s hard doing a photoshoot next to your fellow actress and she’s a third of the size of you.

“I was invisible in a way, even when I was an international movie star. And then suddenly to have people want to carry your groceries, do nice things for you purely because of how you look, it’s interesting.”

Wilson adds, “I know what it’s like to be on the other side of that coin. And now I know what’s it’s like to get attention in the positive. There is a societal bias towards what society deems as good-looking. It’s not right. It sucks, it’s unfair. I feel sad if somebody doesn’t love the body they’re in. You want to celebrate all body types but I also want to encourage people to be healthy.”