broken speedometer on 2005 Kia Amanti

what would cause the speedometer to stop working? At the same time the check-engine light came on?

Asked by for the 2005 Kia Amanti
there's a sensor in the vehicle which works with the speedometer is called the speed sensor this will make the check engine come on get a diagnostic to see which sensor you need to replace.