....unless you want to sell it or have any success with it.
I only say this if you're a first-timer really, eager to break into the scriptwriting world. My college film professor always told us to write what we know. And I did at first. They all sucked. My first 3-4 screenplays were terrible, bad bad bad. Their plots were something about post-college friendship.....ZZZZZzzzzzzzzzzzzzzzzzzzz. Bad plot, dialogue, etc. Pointless. All bad, 100%.
But I'm glad I wrote them, it helped me get the "kinks" out. Whatever it is you're writing, if it's your first script, it'll probably suck. Maybe not, but probably. So don't get too attached.
Screenplay competitions and production companies will toss them, the autobiographical stories, that's my opinion, anyway. They're not the ones that win awards or sell for half a mil. But you need to write them.
So, do I write what I know? Well, certainly there's a part of me in my scripts, but I haven't gotten too personal in years.
And out of my successes, did I write what I knew? No.
Option #1 - 1998, a script called GOOD PEOPLE, bascially a small-town comedy.
Option #2 - 2001, it was a comedy involving porn.
Option #3 - 2002, a kids movie you could see Disney or Nick making.
The best situation to have is something like Noah Baumbach's The Squid & The Whale. He didn't write it and put it out there 10 years ago, he did it now, when he was a BETTER WRITER. And I think it really paid off.
What do you do with your 1st screenplay, that just might be about or have a lot to do with your own life? Put it away, move on or if you think it's worth a damn, maybe re-write it after getting extensive feedback. Just don't count on many people taking to it, if you get it in great shape, you might just have to go and shoot it yourself, which might not be a bad thing.
My ultimate advice? Write whatever the hell you want.
And on an unrelated topic, here's Charlize.......