Animating a drone along a polyline

Hi fellow cesium users,
I am quite stuck.
I have a geojson file with a linestring of coordinates [lat,long,height].
I fetch the geojson in and read the coordinates with const flightData = geoJson.features[0].geometry.coordinates;
I have a polyline displayed:
// Create an empty array to hold the polyline positions
const polylinePositions = ;

// Iterate over the flight coordinates and convert them to Cesium Cartesian3 positions
for (let i = 0; i < flightData.length; i++) {
const [longitude, latitude, height] = flightData[i];
const position = Cesium.Cartesian3.fromDegrees(longitude, latitude, height);
polylinePositions.push(position);
}

// Create a polyline using the positions
const polyline = viewer.entities.add({
polyline: {
positions: polylinePositions,
width: 3,
material: Cesium.Color.RED
}
});
I want to animate a drone that goes along this polyline but i am really struggling. Any help would be appreciated. I have tried ChatGPT which works a little. Its suggested solution places the drone in position 0 but doesn’t move at all.