my1998 explorer, when i put it in drive my engine shuts off, on 1998 Ford Explorer

but it works in reverse just fine. whats wrong with it?

Asked by for the 1998 Ford Explorer
could be a bad lock up solenoid.does the engine run alright when in park or neutral