Try this:
On created obj_Enemy : obj_Enemy spawn obj_enemyGun on layer "game" at image point obj_enemy1.ImagePoint("Gun")
If the point always at the same place you can use Pin behavior: pin obj_enemyGun to obj_Enemy in the same "on created" event
If not you have to include instance variables: Set instance variable "parentUID" of the gun to UID of the enemy when enemy created.
Than every tick for each gun pick an enemy by his UID (=parentUID) and make what you did in your example.
The reason why your example did not work - because you created only one gun, and no matter how much guns you have they all will be at the place of the first enemy because you did not picked every gun to his specific enemy...