Car wont restart after sitting for 5min ???

My car did that and I could never fix it. Changed a bunch of parts but, nothing fixed it. Except this: an older guy tells me to push slightly on the accelerator, no pumping, not to the floor. Worked every time.