Problem with PvZ turret

Hi, I want your help with my problem. A few days ago, I decided to create a Plants vs Zombies game. Everything was great until I decided to create the first turret, the peashooter, I wanted it to shoot horizontally to the zombies in the line, but instead, it didn’t shoot anything and the zombies in the line kept moving.

Can you help me with this problem?

(sorry for my bad english, english isn’t my first language)

Show us the code you made for the turret shooting, and the code for the projectile hitting the zombies or for the zombie line stopping.