How do you move a character to another waypoint after landing on a specific waypoint

Hi, im making a simple snakes and ladders game in unity 2d for a school project using waypoints, but i cant find or figure out how to move the character up the ladders and down the snakes when landing on that specific waypoint.

Any help would be appreciated

Here is my Code for movement:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Movement : MonoBehaviour {

public Transform[] waypoints;

private float moveSpeed = 1f;

public int waypointIndex = 0;

public bool moveAllowed = false;

private void Start () {
    transform.position = waypoints[waypointIndex].transform.position;

private void Update () {
    if (moveAllowed)

private void Move()
    if(waypointIndex <= waypoints.Length - 1)
        transform.position = Vector2.MoveTowards(transform.position,
        moveSpeed * Time.deltaTime);

        if (transform.position == waypoints[waypointIndex].transform.position)
            waypointIndex += 1;


Hi there, you could try to put a Tag in the GameObjects you are using as a waypoint, in this way you can especify where to go when Xwaypoint is landed using CompareTags, hope it works