There are several "rules" that help make a rental profitable. It is going to be more difficult to find a rental that would work.
You are looking for something that can rent for about 1% of the purchase price. So a $100,000 purchase price that will rent for about $1000. Or a $200,000 purchase price that will rent for about $200,000. Keep in mind, that is a rough guide and there are a ton of exceptions on this.
Most people that say that rentals are a bad idea are usually not doing the financial legwork to make it a profitable venture.
I've bought one rental and working on my 2nd one now. Hoping to have it purchased and rented within the next 12-18 months.