Vector3.MoveTowards does not move for some reason

public class Movement : MonoBehaviour {
public Transform desPos1;
public Transform desPos2;
public float speed;
public bool Switch = false;

	// Use this for initialization
	void Start () {
	// Update is called once per frame
	void Update () {
	public void Move()
		if (!Switch) {
			transform.position = Vector2.MoveTowards (transform.position, desPos1.transform.position, speed);
			Switch = true;
			Debug.Log("Switch is OFF");
		} else if (Switch) {
			transform.position = Vector2.MoveTowards (transform.position, desPos2.transform.position, speed);
			Switch = false;
			Debug.Log("Switch is ON");

Basically what I’m trying to do is to toggle a movement of an object back and forth, it should do that based on the Switch bool, but for some reason it doesnt move to the desired spot, in the scene when running it I can see a little movement of the object, a veeeery little movement, but not to the desired spot

Sorry you’ve dealt with a lot of confusion with this issue. Here is a script that I’ve personally tested and it works. I made it so that you can move to unlimited objects, you just drag them into the array in the order that you’d like to move to them. If you haven’t used an array before, it’s fairly easy. It will show up in the inspector with a size of 0 by default. Just increase the number to however many points you have, and then drag in your points like with a normal public GameObject.

Good luck!

EDIT: code

	//Set array length to 2 in inspector if you have 2 destinations
	//Then, drag both gameObjects into array in inspector.
	public Transform[] destinations; //Array of possible destinations
	public int arrayIndex; //Reference to current object we are targeting
	public float speed; //speed of object 
	public bool move = false;
	void Update () {
		if (move) { //Move this transform over time divided by framerate..
			transform.position = Vector3.MoveTowards(transform.position,destinations[arrayIndex].position,speed * Time.deltaTime);
		//For each of the destinations, if we are close enough, stop moving.
		foreach (Transform destination in destinations) {
			if(Vector3.Distance(transform.position,destination.position) <= 0.1 && 
			   destination.transform == destinations[arrayIndex]){
				move = false;
	public void Move() //called OnClick
		if (arrayIndex != destinations.Length - 1)
			arrayIndex = 0;
		move = true;

Umm… I don’t see you calling the Move function. Did you forget to write it here? You have to call it somehow, for the movement code to trigger