making perpetual movement

I am making a simple game involving a ball going down a half pipe. I want the ball to have perpetual movement so that it goes up and down without ever stopping. I have used the Constant Force component, and put it to -10 on the x axis (world). But I need the force to change to +10 once it's done going up the pipe. What would be the best way to achieve this?

You could put a trigger collider at the point where the velocity has to change and have it call a function on the ball which changes its force.

function OnTriggerEnter (ball : Collider) {