Actually it's quite possible to get more excellent melodies (from a person who's learning an instrument) from Piano rather than Guitar
because in guitar you are VERY limited by the amount of chords you know, and the first ones are always D-A-E (Like Desire) and then C and G. Next some minor chords as Am, Em, etc. With a few months (or weeks, depending on person's abiliby) F and B. Latter the first # chords as A#, G# most difficult ones as D#, C#, etc
So from a beginner it's very predictable what he has to do for a guitar based melody: C-G ... could be one part, and the chorus Am-D-Em-G... that's all.
But in Piano it's a completely different word, because first you learn the chord C, with just white keys (1-3-5), and if you put those 3 fingers exactly to the next white keys (2-4-6) you have a Dm, and then (3-5-7) Em, then F, then G, then Am and finally... a very special chord with the notes B-D-F (I love the sound of the combination B-F, it's an open chord of mistery, to lead somewhere
And you have another point: if you play a bit with the piano and you make a "C" with 1-2-5 instead, you have another chord with a wonderful sound, and if you play 2-3-5, another one, etc. So without being a pianist and JUST PLAYING white keys (Black ones are #) you can create several fantastic melodies
something you can't with a little guitar knowedge