Garry's Mod Wiki


  sound.Play( string Name, Vector Pos, number Level, number Pitch, number Volume )


Plays a sound from the specified position in the world. If you want to play a sound without a position, such as a UI sound, use surface.PlaySound instead.


1 string Name
A path to the sound.

Does this function support sound scripts?

This should either be a sound script name (sound.Add) or a file path relative to the sound/ folder. (Make note that it's not sounds)

2 Vector Pos
Where the sound should play.
3 number Level
Sound level in decibels. 75 is normal. Ranges from 20 to 180, where 180 is super loud. This affects how far away the sound will be heard.
4 number Pitch
The sound pitch. Range is from 0 to 255. 100 is normal pitch.
5 number Volume
Output volume of the sound in range 0 to 1.


Plays an explosion sound at the (0, 0, 0) map coordinates.

sound.Play( "ambient/explosions/exp1.wav", Vector(0, 0, 0) )