“Sex sells” is a tried and true marketing mantra. Nothing captures attention like some hanky-panky. But how to do it well is a serious concern for a writer. A badly written sex scene can ruin an entire book and keep readers from considering your future work.

Before you try writing your first sex scene, think long and hard—yes, of course, there will be puns in this article—about your readers. If you are writing a cozy murder mystery, perhaps the readers aren’t craving intense passion, so at best all your hard work would go to waste, and at worst you could alienate your readers.

On a more personal level, ask yourself if you can write an intimate scene and be comfortable with your parents, siblings, extended family, or even just friends reading it. Once you put that writing out in the world, it will be out of your control, so figure out what your own comfort level is before you let it all hang out.

If you have cleared the first hurdles and are ready for some bedroom calisthenics, there’s still a lot to learn. If you’re new to writing sex scenes, you need helpful resources. One of the best out there is by Rachel Kramer Bussel, who, after years of editing the Best Women’s Erotica of the Year anthologies, penned How to Write Erotica. You can also find classes and online tutorials. One option is the platform Passionate Ink, which offers workshops on how to write better erotic scenes.

(Important note: just putting a sex scene into a story does not make it erotica—and don’t let anyone tell you that it does. The definition of “erotica” is that the plot is in service to the characters’ boinking. If the characters occasionally get laid, but it’s in service to a larger plot, then you simply have a story with sex scenes in it.)

Of course, the best writing comes from what you know. If you have a willing partner available, there is no reason not to test-drive your ideas to see if they are realistic, and to get a better sense of how to describe the various sensations and emotions. If you do not have a partner? Well, the internet does have other sources of research material.

I suggest the hands-on approach because sex scenes are built on describing sensations, both physical and emotional. If you just write out the mechanics of it—“X did this, and then Y did that”—you’re going to have something nobody will enjoy. But, if you imbue the action with vivid description of what the characters are experiencing in their minds and bodies and how the activities and sensations make them feel, you will have a sex scene readers will bookmark and come back to read again.

Prepare by going back to sex scenes you’ve read that made an impression. Reading good writing is always one of the best ways to learn how to write. Go over sex scenes that you found unforgettable and take notes.

One of the other best ways for learning how to write is by reading bad writing. There is a plethora of negative examples to teach you what not to do, so they won’t be hard to find. Most have one thing in common: authors writing about things they clearly have never done, with unrealistic expectations for anatomy or the limitations of human stamina—this is somewhat less relevant for writers of paranormal or horror or science fiction—or who really can’t put themselves in the minds and hearts of their characters.

No matter who you are and what experience you’ve had, you can “write the other” (or at least “the not personally experienced”) in your sex scenes. But you can’t—and I beg you not to try to—start rolling in unknown hay without serious research, a staggering amount of imagining yourself experiencing it and how it would feel on every level, and then a serious sensitivity edit before publication.

Just as vital as the deeper descriptions is the placement in the story. Much as in intercourse, you can’t just thrust a sex scene in where it doesn’t fit. Sex scenes should be as beneficial to the entire work as any other element of the story structure. It should move the characters along to where they need to be next. It should deepen the readers’ connection with or understanding of the characters.

Writing sex is complicated, should never be treated as trivial, and does add some risk to a writer’s career and emotional well-being.

Oftentimes, people treat a sex scene as if its only value is adding a bit of naughty thrill to a story. But a well-written sex scene can do a lot of heavy lifting, strengthening and deepening a story in a way that few other types of scenes can. If you want to get to the beating heart of your characters, this is one of the best ways to do that. (Not literally, of course—unless you’re writing horror!)

Your final step is to make sure that your editors can handle your characters bumping uglies. If you have chosen to get a sensitivity edit, that’s wonderful, and make sure to check in with all other editor(s) of this piece that they know there will be a sex scene (or more) in there, and that they are comfortable and experienced with editing amorous congress.

What can you expect once your spiced-up story is out in the world? Beyond possibly awkward conversations, get ready for some people to refuse to read your story because there’s sex in it. Readers today have very specific demands from their fiction; for some it very well could be “closed-door” or “fade-to-black” romance (stories in which sex happens “offscreen,” rather than being depicted directly). On the other hand, there are other readers who will be putting out the request in book recommendation groups for “super spicy open-door sex scenes!” So you will be both potentially losing and potentially gaining certain types of readers.

For a writer, dealing with rejection from readers is hard enough, and adding in sex scenes will add another way for readers to criticize and “DNF” your book. However, if you have written a strong, powerful sex scene that makes an organic whole with the rest of your story, there will be a good balance of readers who see what you have done and praise it in reviews—and come back for more.

Writing sex is complicated, should never be treated as trivial, and does add some risk to a writer’s career and emotional well-being. But, if you have ever been moved by a well-crafted intimate scene, you also know how powerful and important that writing can be.

Be honest with yourself about whether you are ready. If you are, then start doing it, enjoy the process, and I hope you bring more beautifully-written sex scenes into the world.

Raven Belasco is a fantasy and nonfiction author.