Entity:EmitSound( string soundName, number soundLevel = 75, number pitchPercent = 100, number volume = 1, number channel = CHAN_AUTO, CHAN_WEAPON for weapons )
Plays a sound on 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". This does not work with all sound files.
When using this function with weapons, use the Weapon itself as the entity, not its owner!
Do not use this for looping sounds with a filepath: see Entity:StopSound for more details.
1 string soundName
The name of the sound to be played.
The string cannot have whitespace at the start or end. You can remove this with string.Trim.
2 number soundLevel = 75
3 number pitchPercent = 100
The pitch applied to the sound. The acceptable range is from 0 to 255. 100 means the pitch is not changed.
4 number volume = 1
The volume, from 0 to 1.