Hi! I'm guitar player who has been playing roughly 3 years now, and I am trying to write an instrumental song. My problem is that no matter what I do, I just can't write melodies to complete the song. I have tried different scales both major and minor, but i still get the same sound. It either sounds like I'm going up and down a scale or just really sad and depressing, wich don't fit the more "happy" and a little bit melodic rhythm. So any help would be appreciated.

Additional details:
I know some basic music theory about keys and scales, but nothing more.
The song is in g major, and I'm trying to write a melodic metal song in the style of Nightwish or some thing that is a mix of metal and symphony.
DON'T WRITE ANY COMMENTS ABOUT: How this might be to advanced for me or that i should do something simpler, write something helpfull instead.
Standard tuning
You're probably making the mistake of trying to write a melody with your fingers, rather than your brain.

Try the following: play a chord progression and sing over it. Just open your mouth and let notes come out that please you.

Where do those notes come from? That's where you want your melodies to come from.

In order to do this well, however, you need to train your ear. Training your ear allows you to THINK in music, so that you compose with your mind by imagining sounds that inspire you. To train your ear, start by downloading the funtional ear trainer from miles.be (it's MUCH better than interval training you'll see on a lot of websites, and free) and continue by transcribing melodies. Start with really simple stuff that you already know - movie themes, nursery rhymes, etc.

This is a long, slow process for a lot of people. Developing your ear is an ongoing process that never really ends. But the more you work on it, the better you'll get, and the more you'll unlock your musical creativity.
Thanks for the quick reply. I'm going to check out the ear trainer soon. But how do you write a chord progression? I know that you use the chords in the key you are in, I've tried to write one before, but the melody I make deosn't fit the in the song it mostly conflicts with the rhythm and the more faster chord changes.
Really, it's the same thing:

You train your ear to hear and think in chords. And then you let your brain decide what it wants to hear.

So let's say you have two chords that you lke the way they go together. Play them, then listen ... what do you WANT to hear next? Don't play anything until you hear it in your head first.

Repeat as necessary.