Luke Perry will never be forgotten, and neither will his beloved Riverdale character, Fred Andrews.

Season four of the popular drama series returns next Wednesday, and the first hour-long, standalone episode will pay tribute to the actor who tragically died earlier this year after suffering a stroke.

While the cast has remained tight-lipped about the details of how Fred will be written off the show, creator and executive producer Roberto Aguirre-Sacasa teased what fans can expect during the Q&A portion of a special press screening for the episode in Los Angeles on Wednesday.

"I think you see everyone's love for Luke in the episode, [which] I'm very proud of," he shared. "Everyone really pulled together for it."

"When Luke passed, we quickly made the decision that we weren't going to address it in the [third] season of Riverdale. We didn't want to rush it and we didn't want to sandwich it between all the other plotlines," he added. "We wanted to take our time and think about it, and I think that was absolutely the right decision. It allowed us to absorb what had happened and really think about what kind of story we wanted to tell."

Kevin Mazur/Getty Images for The CW

Titled Chapter Fifty-Eight: In Memoriam and set on July 4, the episode is mostly told through the storyline of Fred's son, Archie Andrews, played by KJ Apa. "When Luke passed, it was before we'd really gotten into deep brainstorming about what season four would look like ... and what it would have looked like for Archie had [Luke's death] not happened," he explained. "I do feel that when this happened, it kind of suggested a path for Archie, which is about growing up a little more quickly than he would have."

Aguirre-Sacasa, along with the writers, knew that filming the tribute was "going to be brutal" on the young cast, especially 22-year-old Apa, who shared an extra special bond with Perry as his main scene partner.

"Luke and KJ, almost every episode had a scene in the kitchen, and no matter what was going on, you'd find them at the island and Fred would be giving Archie advice, which he would or wouldn't listen to," Aguirre-Sacasa said. "I talked to KJ about it, and I think everyone was really proud to gather to tell this tribute to Fred and to Luke."

"I think everyone was -- I don't want to say happy to have a catharsis -- but when [Luke's death] happened we were kind of all scattered," he recalled. "So there was something really special when we gathered to do the table read that was cathartic and shows our families. We knew it was going to be hard, and it was."

Kevin Mazur/Getty Images for The CW

And just as Fred was always there for Archie and his friends, Perry was the cast's go-to guy on set when it came to advice.

"He was a mentor and a father figure to KJ and to all the kids," Aguirre-Sacasa said. "I remember when we went to the first Comic-Con for Riverdale, it was right before the show aired and I remember vividly hearing Luke say to KJ, 'After the show comes out, it will not be like this again.' We weren't in that headspace. We were still filming, the show hadn't premiered, so it felt off, but Luke, he could see [the success and fame] kind of coming."

To make the tribute even more special, producers got Perry's former Beverly Hills, 90210 co-star, Shannen Doherty, on board in a yet-to-be-revealed guest-starring role.

"Over the seasons, Luke and I talked a lot about trying to get Shannen on the show," Aguirre-Sacasa recalled. "The timing never worked out, or the part was never quite right -- she was doing this or unavailable or it didn't feel right."

"When we were working on the episode, we knew that there would be some characters outside of our cast of characters that would be involved," he continued. "I think she really wanted it to be part of it, from the moment we first talked to her about it."

Robert Falconer/The CW

Additionally, real photos of Perry are sprinkled into the upcoming episode, which Aguirre-Sacasa confirmed were personally provided by the late actor's family.

"Yeah, we did [get those from Luke’s family]," he shared. "One of our executive producers, Sarah Schechter, was very close to Luke and very close to his family. We involved them as much as we could. They read the script and then they provided those great photos."

"I think it is cathartic for people who have seen the show," he added, "and hopefully it's cathartic for people who have emotional ties to Luke as well. Another kind of different thing that we chose to do was not include a 'previously on.' We actually had one and The CW very wisely said, 'You know what? Don’t include it. Use the extra time for the episode; even a minute is precious. And let it be kind of special.'"

Aguirre-Sacasa confirmed to ET back in May that they were planning to acknowledge Fred's disappearance "at the top of season four."

"We knew we had to honor Luke and address Luke's death on the show," he said at the time. "We had the table read for it ... and I'm not going to lie, we were all crying. But we think it, again, honors the memory of Luke [and] it honors the memory of Fred. They were both such amazing human beings that we wanted to really, really craft an emotional and deep tribute to him, which is what I hope this episode is."

Riverdale returns for its fourth season on Wednesday, Oct. 9 at 8 p.m. ET/PT on The CW. In the meantime, hear more from the cast in the video below.

RELATED CONTENT: