I have only loop so far but I want the train carriages to follow eachothers like a train in single player.
local, loco = createVehicle ( 537, 1467, -1532, 10 )
for k=1, 5 do
local carriage = createVehicle ( 590, 1467+(k*18), -1532, 10 )
attachTrailerToVehicle( carriage, loco )
end