Making a 2D player move along the x axis with 2 UI Buttons

Hey guys, I’m wondering how to make a 2D player move along the x axis with 2 UI Buttons. I am using C# but Javascript will also work. If anybody has an answer, I would be extremely thankful.

Well, if one button is pressed subtract a value from x, and if the other button is pressed, add a value to x.