Cast Away The Shooting Script

Cast Away The Shooting Script / So, i want a enemy shoot script for my game that does something like, when you are 20 meters away it starts shooting at you and just stands still or walks towards you.