new to scripting need serious help

ok so the title says it all, but let me elaborate. im trying to create a river, i have my transparent texture/riverbed created. i have a river textured mesh that flows but i want to change the direction it flows IE it flows along the X axis and i want to to flow off the y (i may have the directions wrong but basically i just want to change the flow’s direction.

here is my current code (found online via various search attempts)

public class mywaterscript : MonoBehaviour {

public float OffSetSpeed = 0.5f;

// Update is called once per frame
void Update () {

float Offset = Time.time * OffSetSpeed;

renderer.material.mainTextureOffset = new Vector2(Offset,Offset);

}
}

any help/tips/explanations would be welcome (i have no exp in any type of coding and im trying to teach myself)

Right now you move in both directions, because Offset is set to both axes( Vector2(X,Y) ).You could either replace one of the “Offsets” with 0 or do this:

renderer.material.mainTextureOffset.y = Offset;

Just replace the y with x depending in wich direction you want the texture to move.