Trails in just one direction

Hi im new using trails in unity, and im wonder how do i make the trail rendered work only when the object move in one direction an not all directions, i want a trail work just on movement +x and another -x

the trail follows the object movement, so you can create an empty object that in the update copys the x of your desired object so that both have the same x and attach the trail to the empty object, just make sure the start z and y are the same in the trail and in the empty object.