From the Super Mario Wiki
Retrieved from "http://www.mariowiki.com/index.php?title=Vanish_Cap&oldid=2058130"
The Vanish Cap is a cap found in Super Mario 64. When worn, it turns Mario temporarily into Vanish Mario. In this form Mario can walk through metal fences and certain walls. Mario must first press the blue ! Switch in order to activate the blue ! Blocks which contain vanish caps.
In Super Mario 64's remake, Super Mario 64 DS, Luigi gains the ability to become immaterial when he picks up a Power Flower, but the Vanish Cap itself is absent. Its music is the same as the Wing Cap music.