I was scared yesterday when I saw a disheveled man walking towards me.
How did he scare you? What did he say to you?
He didn't say anything. I yelled at him that he needs to clean himself up and that he should be ashamed of himself.
I think you believed you were helping this man by pointing out his appearance, but it's rude to judge someone on their appearance. They may be going through a difficult time and can't help the way they look. It's not right for you to judge them and it's quite rude.
You shouldn't walk around looking like that, it's not sanitary.
Everyone has the right to look the way they want. This man may have a mental illness and can't take care of himself properly. Yelling at him is cruel, try to treat people like this with kindness.