The issue is not whether your friend will "take the blame"--the issue is whether there is evidence that you committed a crime. If there is, then the fact that your friend may be willing to accept responsibility will probably not help you. For example: say that the issue is that you and he are accused of shoplifting from a store. If there is security camera footage showing that you helped him to take the item(s), then the fact that he may be willing to say it's all his fault will probably not save you from charges or conviction--there is photographic proof of your complicity. So you have to look not just at your friend's confession, but at the totality of the evidence, to see whether your friend taking the blame will help you.