Moving the actor along the spline by points in reverse order from the beginoverlap

Hi! There is such a piece of code in the begin overlap. The actor has a spline component (not looped), I need the actor that collided to move along the points of this spline, starting from the last point. The problem lies in the while loop, that is, I check that if the position of the actor is not equal to the position of the spline point, then move the actor in this direction, but the problem is that when the actor gets into a collision, then everything hangs for the duration of the while loop, the question is is how it can be bypassed in another way?
Sorry for my english.