5 hours ago, iLostMyXbox21 said:
So i have a unity project and the script changes the movement on the Y axis, it should stay left and right, but now it goes diagonal..
Your current code has movement in local space. You need movement in global space.
transform.Translate(Vector3.right * speed * Time.deltaTime, Space.World); // this moves to the right transform.Translate(Vector3.left * speed * Time.deltaTime, Space.World); // this moves to the left
What you are dealing with is the difference between local position and world position.