3D Object Moving to another object on the x axis

I’m kinda new to programming and game development as a whole, I’m making a small game to get some practice, unfortunately I ran into some errors. Its a 3D platformer in the way of a 2D platformer. Like Geometry Dash but 3D. I want my player to move towards the end goal automatically with the only button being jump. I’ve tried many ways of coding the program. Most of the time it would follow on every axis. But because I want it to move like a 2D game, I need it to move on one axis. Any help would be appreciated, Thanks.

We’re all sorry to hear this.

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

How to understand errors in general:

https://discussions.unity.com/t/824586/8

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: https://discussions.unity.com/t/481379