Elle Fanning tells PEOPLE how here real-life transgender friends helped prepare her for her role in Ray

Elle Fanning knew from personal experience that taking on the role of a transgender teen in her new film Ray would be no easy task.

“I definitely knew that it would be a huge challenge to do – I’ve definitely never done anything like that before,” the 17-year-old actress exclusively tells PEOPLE at the Toronto International Film Festival, alongside her costar Naomi Watts.

Get push notifications with news, features and more.

Fortunately, Fanning says that spending time with her real-life transgender friends gave her a foundation of understanding.

“I have a lot of transgender friends that go to my school, who have made the transition over the summer and have changed their names and used different pronouns,” she explains. “So I was used to that.”

At the same time, having a personal connection to transgender kids added to the pressure of doing their story justice.

“I was really nervous not to screw up, because this is for transgender kids out there,” Fanning admitted to The EDIT for its cover story this week.

The young star also shared with the magazine how she had to bind her chest to pull off the right look.

“It’s like a sports bra that you wrap around, only it’s Velcro. I had to wear one every morning. It hurt so bad!” she said.

But Fanning also says she was drawn to the film because it’s about how the transition affects an entire family.

“It’s not just about a transgender teen, it’s about a family and how everyone’s dealing with it,” she says. “I love Ray and I love his story and I just wanted to tell it.”

Ray‘s world premiere is this weekend at TIFF, and the film hits U.S. theaters Sept. 18.