I write for a living. Both fiction and non-fiction. I am also "successful," by writer standards. I self-published a book on Florida Gardening which has done quite well (it pays the rent), then a publisher picked me up to write my book Compost Everything, Grow or Die and Push the Zone - three more non-fiction titles. They've done well, and I've gone on to voice audiobook versions of all three which have also done well.
Don't worry about people discouraging you. To write, you need to write, write, write. Start a blog and make yourself post daily. Or make yourself write 500 words a day, every day. You need to learn to be creative on demand, then you'll make it. I put on some music, drink some coffee, then type out at least 2,000 words a day.
Non-fiction is probably a better place to make money than fiction, unfortunately. Breaking into fiction is very difficult unless you're driven and also quite good at writing. You also have to be a relentless self-promoter. With non-fiction you can write articles to make money. I've written for Backwoods Home, Mother Earth News, prepper websites, The Grow Network, Self-Reliance Magazine, etc., to bring in some extra cash and raise the profile of my books.
But fiction or non-fiction, if you write every day, write well, and can promote relentlessly, you will have success. If you attack it half-baked, you will almost certainly fail.
One of my favorite self-published writers is Larry Correia. He's worked his tail off and is now successful. Another success story is Nick Cole. His publisher didn't like his view on something and cut him off, so he went and self-published instead. He's probably a millionaire at this point from his ongoing Galaxy's Edge series. However, he and his co-writer publish a new novel every single month. That means he's writing at least 2500 words per day every day.
Currently I'm working on a five-book fiction series under a pen name doing the same thing. 50k words per month, every month for five months. That is with a publisher, however, and they're doing the promotion. Thus far it hasn't touched the sales on my gardening books but as the series grows it's likely to catch and may even make more.
As for "going broke" self-publishing, don't worry about that. Use on-demand printing or just stick to kindle versions. It's very easy to publish with Amazon and they're the world's largest book market. Don't spend any money on printing. Invest in someone to do the kindle and print layouts, though.
And WRITE WRITE WRITE! No excuses. If you can write even 500 words per day, you'll reach 100,000 words in under seven months. That's a solid book. I made myself write 3,000 word per day back in November and hit 90k words in one month. I eventually divided that into two novels, one of which will be coming out soon, followed by the second.
You can do it, but most people won't put in the work. It's not a great way to get rich but it's very satisfying.