Change directions, at random times?

“Yes, a constant movement would be Ideal. I would just like the object to invert its direction on the x axis at random times.”

Thanks for future help!

Now that you’ve explained what you actually want, here it is

the critical thing is you want the gaps in time to be random. Here’s how to do it.

to change direction, it’s velocity = -velocity;

// put this next line in say Start() ...
Invoke( "NewFunDirection", Random.Range(0.5,2.0)  );

function NewFunDirection()
 {
 rigidbody.velocity = -rigidbody.velocity;
 Invoke( "NewFunDirection", Random.Range(0.5,2.0)  );
 }