There is some research suggesting that one of the ways that you can get this all to work in a group situation is. assigning people distinct roles, so only i can play this part. But there has to be a uniqueness to that feeling of responsibility to counter social loafing. So being in the group would inspire pro social behavior, rather than diminish it. There is also an effect known as the colar effect which increases motivation and performance when put into teams. This idea was originally speculation about groups with mixed ability - like some people are stronger, others weaker. It's named after a person named coler.
Also: why is it so great to be part of a team, even when you lose?