Error With Multiplayer

When I host a 2 player game for me and my friend my game crashes whenever he joins. We tried different things like i tried making a ded server but when i tried to connect my game crashed so if there is any way to fix this please help.