Writing a play.
Several years ago, I undertook an online writing course. The result of which was I came in the top 5% of writers on the course, and most had been writers who had earned reps for many years.
In the beginning, I was in the middle of the class, then we changed to writing dialogue-driven work and I hit my stride. I cannot understand the problem of writing dialogue.
There are a few easy to recall rules -
A different line for each speaker.
Let the reader know who is talking if you have more than two people involved in the chatting.
At various times, it has been suggested that I should try my hand at writing for TV/Radio as most of my work is dialogue-driven.