I know how to write my own riffs but I don't know how to switch into another riff without making it sound bad and both riffs are on the same scale. Can anyone help me out?
Try to come up with a 3rd riff that bridges it well. Do the 2 riffs you have change pitch greatly? You could use a slide of some sort, or maybe just a slight pause w/drum or bass fill.
You could try to just make another version of the first riff. They will sound the same yet totally different . The transition between such riffs should be easy.