We present a model to account for the observed debris discs around youngwhite dwarfs and the presence of metal lines in their spectra. Stellarevolution models predict that the mass-loss on the AGB will be pulsed;furthermore, observations indicate that the bulk of the mass-loss occurson the AGB. In this case, if the progenitors of the white dwarfs hadremnants of planetary formation like the Sun's Oort cloud or the KuiperBelt and a planet lying within that cloud or nearby, we find that up to2 per cent of the planetesimals will fall either into planet-crossingorbits or into chaotic regions after the mass-loss, depending on thelocation and mass of the planet (from Mars to Neptune). This yields asufficient mass of comets that can be scattered towards the star, form adebris disc and pollute the atmosphere