how can i move an object with constant movement ?

hello guys i’m new to c# Scripting and just started a couple of days ago my Q is so simple i’m trying to make a game like geometrical dash in a 3D version so the game is pretty simple just constant movement along X or Z axis and jump over some obstacles can anyone help me on how i can creat such a script ? thanks all

i think that rb.velocity = new vector3 (0,0,0) would work