Two years after graduating from Marfa High School, Eli Cordova was working at a local coffee shop and figuring out what to do with his life. A gregarious teenager with a wide, welcoming smile, Cordova loved his small hometown but also felt stifled by it. He worried that if he didn’t move away soon, he might end up as one of those people who never left.

In late 2015, inspired by a rare Marfa snow day earlier in the year, he wrote a short story based on his memories of living in Alaska as a child and then tacked it to the coffee shop’s bulletin board. Cordova had been writing stories for a while, but nothing had ever come of them, and he had no reason to think this one would be any different. But a few weeks later, the story was spotted by a production team that was scouting Marfa as the possible location for I Love Dick, a comedy series that the writer and director Jill Soloway was pitching to Amazon Prime. They liked the unsigned story so much that they considered working its plot into the show’s pilot—but they knew they’d need to figure out who had written it.

So when they returned to town in June to film the pilot, one of the first things they did was ask around. It took about a day to track Cordova down. When they met him, they were surprised—and pleased—to learn that he was transgender. Soloway, after all, is best known as the creator of the Amazon series Transparent, about a middle-aged father coming out as a woman.

The excitement went both ways. Though the Marfa community had largely been supportive of Cordova’s transition from female to male, he felt isolated as one of the few queer kids in town; Transparent had eased some of that discomfort. “It came out around the same time I was coming out,” he says. “I was stuck in the middle of the desert and I didn’t know any trans people. It was pretty amazing for me to watch that.”

Stills from “I Love Dick.”Griffin Dunne and Kathryn Hahn, Kevin Bacon: Photographs by Patrick Wymore/Amazon Prime Video; India Menuez and Roberta Colindrez: Photograph by Jessica Brooks/Amazon Prime Video

During the week of shooting, Cordova spent time hanging out with the cast and crew—and grew close enough to Soloway that she invited him to visit her in Los Angeles. And so, a few weeks later, Cordova flew to California, where Soloway quickly offered him a job as a production assistant for I Love Dick, which had just been green-lit for a full season. Cordova had no pressing desire to work in Hollywood, but he knew he needed to get out of Marfa. He returned to town to pack up his things and host a drag-themed goodbye party. Several cowboys showed up wearing long dresses. “People looked so pretty,” Cordova says.

Back in L.A., Cordova began working in the writers’ room, fetching coffee and keeping things organized. People soon figured out that it was useful to have a real, live Marfan around as they put together the show’s first season (which will be released on May 12). Cordova helped fact-check plot points and tagged along on location-scouting trips, looking for places in Southern California that resembled West Texas. (The show is primarily filmed in L.A., though there’s also footage of Marfa.) Outside the writers’ room, Cordova spent a great deal of time correcting Californians’ misconceptions about his hometown: “I find myself saying, ‘Actually, the majority of Marfa is Hispanic. There’s a school. There are a lot of things going on apart from the art.’ ”

In December, the I Love Dick team flew to Marfa to do some location shooting. It was the first time Cordova had been back since the move, and it was jarring. There’s a time-honored Marfa tradition of bemoaning Hollywood productions that come to town and cause traffic and treat the place like they own it. Now Cordova was seeing things from the other perspective. “I’m sort of on both sides,” he says. “I can’t choose a side.” Socially, it was a struggle: he didn’t want to ditch his L.A. friends, but he didn’t want his Marfa friends to think he was too cool for them either. “It didn’t feel like home. It wasn’t comfortable.”

He returned to L.A. more homesick than ever. After production wrapped up, he previewed episodes of I Love Dick, but it didn’t cure the ache. It’s impossible for Cordova to be objective about something he’s so close to. He was annoyed when characters said they were heading to the Lost Horse Saloon and then started walking in the opposite direction. “I’ve had to kind of disassociate a little bit,” he says. “This is a television show—it isn’t a documentary.”

Despite these moments of dislocation, Cordova says he’s happy in L.A. He sees a doctor who specializes in hormone-replacement therapy and has begun testosterone treatments; that kind of medical care would have been difficult to access in Marfa. “I can’t believe that I’m still alive,” he says. “I didn’t realize, until I started testosterone, how depressed I was.”

Recently Cordova began working on a series of short stories and poems about the strange feeling of being stuck between two worlds. In Los Angeles, he says, being from Marfa is his biggest pickup line. “It’s also one of the worst things that can happen in a conversation, someone being like, ‘Oh, you’re from Marfa.’ ”