Garry's Mod Wiki
Description
Plays a sound on an entity. See also EmitSound if you wish to play sounds without an entity.
If run clientside, the sound will only be heard locally.
If used on a player or NPC character with the mouth rigged, the character will "lip-sync" if the sound file contains lipsync data. See this page for more information.
You can do one of these instead:
- Use sound.GetProperties to select a sound from the script, and play the sound file directly.
- For single-use sounds, you can pass the SND_CHANGE_VOL or SND_CHANGE_PITCH sound flags. However, this will change the volume or pitch of the sound if it's already playing, instead of starting the sound over or playing another instance.
- Use EmitSound with the entity parameter set to the Entity:EntIndex of the entity you want to play the sound on.
Arguments
This should either be a sound script name (sound.Add) or a file path relative to the sound/ folder. (so don't include sound/, and make note that it's not sounds when moving the sound file itself)
Example
This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.
Page content is automatically updated four times a day. Edits and history are not available.
Last Parsed: Loading...