sound global · type Sound
Plays and stops sounds for everyone in a room: the sound global, or room.sound.
Functions 3
sound.play(name: string, opts: { at: Vec3?, volume: number?, pitch: number?, category: string?, }?)Plays a sound by name to everyone in the room; volume above 1 carries further, pitch 0.5..2.0.
sound.stop(name: string?)One sound by name, or every sound, for everyone in the room; 1.13+.
sound.stream(opts: { url: string?, file: string?, at: (SoundSpeaker | { SoundSpeaker })?, to: (Player | { Player })?, distance: number?, loop: boolean?, name: string?, }) → SoundStreamA live stream (MP3, or an FLV's sound) or a pack's sound file (OGG, MP3, WAV), heard through the mod a screen's stream uses. With at, from speakers: each player hears every speaker within distance. Without, from no place, at one volume. to: only these players. loop: files only.