Ghost plane in mission

Hi, I am looking for some information around adding a ghost plane to custom
mission. The track is a set of waypoints with defined end trigger. I am aiming
for it be something similar to current Reno Race where we can fly with the
ghost of our best time so far. Any information, samples or templates are
welcome, as with recent changes to Script Editor I lost my “go to” way for
going through undocumented features.