I’m trying to get GameObject A to follow GameObject B just behind it but only on the forward z-axis, as soon as GameObject B starts moving backwards on the z-axis I want GameObject A too stop until GameObject B starts moving forward on the z-axis again. Any insight would be helpful.
You can compare the differences in their Z axis position and decide if they are far enough away to warrant moving, then move them appropriately. Without actually seeing your code, it’s not possible to be any more specific.