Greetings gunnervikas and welcome to the new yoyo forum.
your question is a bit vague because i do not understand what is touching what but ill presume that the bullets only go in one direction and the bars are buttons you click.
if thats the case then take all the colours for the bullets and put it in one sprite image, then make anothe sprite for the bars and make sure the order of the bars is the same as the order of the bullets.
then when you click on a button have it say
Code:
bullet = instance_create(self.x,self.y,obj_bullet) //this is presuming you are having the button create it
bullet.image_index = image_index //this will match the bullet colour to the bar colour
and you are done, so long ass the bullets and bars are in the same order in the sprites then you will have bullets that match the bars that shot them.
hope this helped, good luck.