For a start, it is really difficult to tell why people don’t enjoy hanging out with you. It is so much easier to judge yourself from other’s perspective to see things that you fail to notice. Most people are open to the idea of having more friends, but it could just be your approach on making friends that are often just not good enough. It is not enough that you are being nice to them. Lonelier people often have this idea that just simply talking to them is enough to get invited out with the group.
If you just greet them and exchange pleasantries with them, they would probably think you are indifferent to them. The key here is to put yourself in their radar, through which they know you exist, interested and available. It’s a common mistake, however, to think that if people like you, they will invite you. They are still just lazy and thoughtless towards you despite all the great conversation you had with them. They’d love to hang out with you (probably), but they don’t think about it, when they do, it’s likely that they want to maintain the easy status quo you had with them. Remember, you don’t owe anything to them and they don’t owe anything to you.