A longitudinal wave can be created in a slinky if the slinky is stretched out in a horizontal direction and the first coils of the slinky are vibrated horizontally. In such a case, each individual coil of the medium is set into vibrational motion in directions parallel to the direction that the energy is transported.
Hope it helped :))