How can I make GameObjects translate across the screen smoothly?

Basically, I have a game where tickets appear at the top of the screen. When a ticket is completed, it gets destroyed, and if there’s a gap between the remaining tickets, the tickets slide down to fill in the gap. I actually have it working just fine, but they kind of just jump to the positions and it doesn’t look very pretty.

How can I move the objects to their target position smoothly? I’ve tried messing with Lerp and Smoothdamp, but both ofthose seem to be producing strange results (tickets go all over the place. Here’s the relevant code I’m working with:

public void SlideRail()
    {
        ticketList.RemoveAll(x => x == null);
        int count = ticketList.Count;

        for (int i = destroyedIndex; i < ticketList.Count; i++)
        {
            if (ticketList[i] != null)
            {
                ticketList[i].transform.Translate(Vector3.left * 35);
                ticketList[i].GetComponent<Ticket>().index--;
            }
        }
        indexer = railPosition.IndexOf(ticketList.Last().GetComponent<Ticket>().item_pos);
        up = false;
    }

DestroyedIndex is the index of the object that was destroyed (so that we only move the objects after it in the list)
Up is a flag that activates SlideRail(), when its set to false the method ends and the next method continues.

SlideRail is then called in the Update() method:

void Update()
    {
        if (up && ticketList.Count > 2)
            SlideRail();


        if (Time.time > nextTicket)
        {
            nextTicket = Time.time + timeBetweenTickets;
            StartCoroutine(WaitToPrint());
            CreateTicket();
            UpdatePosition();
        }
    }

I feel like I should be able to do this using Translate, but I must be missing something. Any help would be greatly appreciated, thanks!

I didn’t test this out but I think line 10 should be:

 ticketList[i].transform.Translate(Vector3.left * 35 * Time.deltaTime);

Thats what I thought as well. When I add Time.DeltaTime, the tickets move one unit left but that’s it. Is there something I’m missing in the update()?

to make actually a movement over time, you need to store a start-position, the start-time and you need your destination position and a variable how long this should take.

Then you can calculate, how much time is passed from the desired movement-time, normalize that to 1, and than use that factor to lerp between start and destination position.
You might need a boolean too, to indicate if that particular ticket needs to be slided.

Your code seems to only call SlideRail for 1 frame.

If these are UI objects, you can use a layout group to automatically handle the shifting for you.