If someone owes you money, and you get a notice that they've filed bankruptcy, are out just out of luck? Honestly, yes, most of the time. If you got a notice that someone filed bankruptcy, that likely means they listed you as a creditor. Most of the time, your debt will end up getting discharged by the court, and you won't see any further payment. Beyond that, you're also stopped from taking any action on your own to collect that debt.
In rare cases, you might see a small repayment. If it is a Chapter 7 case and the trustee assigned to your debtor's case finds assets for creditors, you'll have a chance to submit a claim to the court to be in line for payment. No claim filed means no payment. Generally everyone who files a claim shares in any proceeds, so don't expect a huge check. If it's a Chapter 13 case, you'll be invited to file a claim to collect whatever you're entitled to under the debtor's monthly payment plan.
In other, rare cases, you might have grounds to object to a debtor's discharge. If you think the debtor lied to you or tricked you or was otherwise deceptive in getting you to lend them money, you might be able to object to the discharge of their debt. This depends heavily on the facts of your scenario, and is an option you should talk over with an experienced bankruptcy attorney.
Finally, some types of debt just aren't automatically discharged. For example, if you're owed child support or alimony and your ex files bankruptcy, you don't need to do anything. Those debts won't go away. If in doubt, though, ask a lawyer if you need to take any action to protect yourself.