I've create a quick setup, and it is working.
Only using 1 state, without transition...basically I created two variables, one called x_axis, and the other is x_pos.
Using get axis, I've added to the x_axis variable, and then using float operator x_axis value is added to x_pos variable and store it to x_pos again, below float operator, I've added float clamp, and chose x_pos variable with a min and max value, finally I've set the position using x_pos variable...
here is the screenshot of it (hope this helps):