Picking up passengers

Is there any way, in a side-scrolling platformer, to have ai characters idling along the way, and if the player chooses, as he drives by, he could “pick up” the ai and put him/her in his vehicle as a passenger?

You could check if the Ai is in collision with the player/car and if a specific button is pressed. When those 2 conditions are true you could then either change the position of those Ai to the player/cars position or you could save the name of their instances and then delete them and recreate them when you decide to “drop” them of.