Valve train noise

I thought that I had a bad lifter as at time I would here a what sounded like a lifter noise but when I let off the gas pedal the noise went away, scratching my head as to why and then come to find out my driver side header collector gasket was burnt out, end of noise....