I think you ou should try reloading Minecraft, then it may work.
Steps that could potentially help you
1.) Check your internet conection
2.) Reload Minecraft
3.) Try to do it again after you do these steps
I hope this helps you 😃
1.) You probally shouldn’t use caps
2.) Is your friend’s settings have un-trusted skins to not show on?
This has happened to me before and all I needed to do was check my internet. It should work then, hopefully. Also other times I just wait for it to load.
What are you hitting the zombie with and on what device did the bug occur?