If you want to play something that you hear, you need to listen with your mind's eye. You've heard of the mind's eye, right? Your mind has an ear too. It's a kind of listening, but it's not using your ears to listen. It's listening with your inner ear, and that's what you want to translate onto the guitar