I am trying to use the following logic to get my enemy to move right to left. I believe it could work in the following way, however I am not sure the issue is. Any help would be welcomed. The way it should is that if the enemy is in position.x 11 (it will start in this position) then it should transform to position.x 12 and loop so that it just goes from right to left.
For transform.position.x to equal exactly 11 or 3, you need to make sure you’re using a function that will result in an exact location. Currently you’re using Translate, which moves directly to a position. The value you’re giving Translate isn’t an exact position, but an offset that you’re trying to apply. So you’re using the wrong function for the job (or you need to do currentPosition + offset)
A better function is MoveTowards, which will never overshoot the target and result in exactly the final position.