To play a young serial killer in “My Friend Dahmer,” ex-Disney Channel star Ross Lynch didn’t just walk in his character’s shoes. He took over the childhood home where Jeffrey Dahmer grew up and murdered his first victim. The movie shot for two weeks in that eerie location, near Akron, Ohio. “When I arrived, I felt comfortable,” says Lynch, 21. “This is going to sound weird — it was almost like I was home.”

“My Friend Dahmer” (based on a graphic novel by Derf Backderf) is a departure for Lynch, who starred in “Teen Beach Movie.” He wears shaggy hair and big glasses to channel a disturbed criminal who murdered 17 men and boys before his 1991 arrest. This story takes place before that, as Dahmer is graduating from high school in the late ’70s and struggling to fit in. But the role in the independent movie, which premieres at the Tribeca Film Festival on Friday night, started to seep into the actor’s psyche. “I kept losing sleep because — in my imagination — I kept seeing him in the corner of my room. That was really frightening.”

Lynch spoke to Variety about the film and if he’s trying to break away from his squeaky-clean Disney past.

What did you know about Jeffrey Dahmer’s story?

Believe it or not, I didn’t know who Jeffrey Dahmer was. It was born in ’95. And I think he died in ’94. The script was floating around. It was a Black List script. My agent emailed it to us. I thought, “This sounds really interesting.” I auditioned a few times.

There’s a tradition of Disney stars — from Anne Hathaway to Selena Gomez — going dark in independent films. Were you trying to show your range?

Yeah. When I was doing the majority of the Disney stuff, I was always thinking, “What’s next?,” because Disney is not forever. Although it was a great time and I learned extraordinary things, I knew there had to be something [else]. I didn’t want to go off the rails and started partying. When “Dahmer” came along, it was the perfect opportunity to really immerse myself in that role and hint at what I’d like to do in the future.

How did you research Dahmer’s life?

It’s so twisted and scary to read about the things he did. He was also surprisingly smart and charming. There are many interviews about him confessing about what was going through his head. It was cool to listen to how he spoke. He had somewhat of that Midwestern twang, almost like a Minnesota accent, but not really. I did a subtle version of it.

Did you see the Jeremy Renner movie?

I didn’t. That was a different time in Dahmer’s life. I’m doing a version of him slowly losing his humanity. I would kind of walk around the house and practice the movement.

What did you base his walk on?

I based it off Jeffrey Dahmer. There are a few interviews, it’s very short, but he walks right into the interview. He was a big guy and he was really burly. He was somewhat gentle in his younger years, because he was so shy. And he was so strong; he had awkward movements. I was really trying to get that. When we were filming, word got out, because we were in his hometown. People showed up on set and they were like, “There’s no way.” They were shocked at how accurate my walk was.

You actually look like a young Jeffrey Dahmer.

I know. It’s kind of scary.

It’s hard to read about what Dahmer did to his victims. Did the role get to you?

The most I felt the role had affected me was when I got home. I realized how much was lingering. I was anti-social for a second. Generally, I’m a happy person.

Did you grapple with the idea that by telling a serial killer’s life, you might be celebrating him?

I wanted to show the sympathetic version of what happened to him. I don’t think it’s a celebration.

Can your Disney fans see this film?

I think there’s definitely a wide range of my fan base that would enjoy it. I remember when the press release first came out, a lot of people on Twitter and social media were really excited. They like to see a departure, too. They like to see growth. But if you’re a 10-year-old fan or a little younger, maybe this isn’t the right film for you.