You can create a motion tween along a path using a motion guide
You can draw a line using the pencil tool or other tools
Notice the triangle follows the path but it is very stiff
You may have to rotate the triangle at each keyframe so it aligns to the motion guide Now it should follow the line and rotate with it