Snake vs blocks snake movement!

I am working on figuring the movement of snake vs blocks game from about 20 days, i succeded to make a smooth follow of tail but the problem is the gap in between the tail pieces when i try to move the snake fast from one place to another.
Need Help!

@Nishchhal If you don’t mind copying the script that makes the snake move maybe I can help.
btw is is C# or Java because if java i don’t know

Sor

Sorry for the late reply here is the script.

    • using UnityEngine;
  • using System.Collections;
  • using System.Collections.Generic;
  • using System.Linq;
  • {
  • public Transform head;
  • public Transform[ ] segments;
  • List breadcrumbs;
    • public float segmentSpacing; //set controls the spacing between the segments,which is always constant.
  • {
  • //populate the first set of crumbs by the initial positions of the segments.
  • breadcrumbs = new List();
  • breadcrumbs.Add(head.position); //add head first, because that’s where the segments will be going.
  • for (int i = 0; i < segments.Length; i++) // we have an extra-crumb to mark where the last segment was…
  • breadcrumbs.Add(segments*.position);*
    • }*
    • {*
      • if (headDisplacement >= segmentSpacing)*
    • {*
    • breadcrumbs.RemoveAt(breadcrumbs.Count - 1); //remove the last breadcrumb*
    • breadcrumbs.Insert(0, head.position); // add a new one where head is.*
    • headDisplacement = headDisplacement%segmentSpacing;*
    • }*
      • if (headDisplacement != 0)*
    • {*
    • Vector3 pos = Vector3.Lerp(breadcrumbs[1], breadcrumbs[0], headDisplacement / segmentSpacing);*
    • for (int i = 1; i < segments.Length; i++)*

Eagerly looking for help on this topic. Any help will be very helpful.
Thanks in Advance.