How to make enemy fire towards player in 2D

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly

Generally you subtract the shooter’s position from the target position, normalize that and use it as the basis for your bullet velocity. Or you can use shortcuts such as tranform.right (or up) for your velocity basis.