Plucking a guitar string is an example of transverse wave of string vibration, while sound produced by it gives you a longitudinal wave in the air.