TEHX Tajima only needles 1-5 will sew

My TEHX will only sew on needles 1-5. It makes a clicking noise and skips stitches (especially wide satin stitches) on all other needles. We recently replaced x axis motor.

That sounds like the jump stitch mechanism not being fully retracted so that some of the time it catches and you lose stitches or other times it almost catches and clicks.
Of course, the precise reason can vary from machine to machine and I'm not particularly familiar with the internals of that model.

I doubt it has anything to do with the x-axis motor, unless the degrees for pantograph movement are completely off. That would cause all sorts of other horrible effects too, though, such as broken needles and strange dimension variations.