Sound plays built-in sound effects and streaming music for the place or a single Player.
Available as the global Sound.
Overview
Methods
- :Play(sfx: SoundEffect|string|int)
- .play(sfx: SoundEffect|string|int) deprecated
- :PlayAt(sfx: SoundEffect|string|int, x: number, y: number, z: number)
- .playAt(sfx: SoundEffect|string|int, x: number, y: number, z: number) deprecated
- :PlayMusic(url: string, volume: number?)
- .playMusic(url: string, volume: number?) deprecated
- :StopMusic()
- .stopMusic() deprecated
- :PlayMusicFor(player: Player, url: string, volume: number?)
- .playMusicFor(player: Player, url: string, volume: number?) deprecated
- :StopMusicFor(player: Player)
- .stopMusicFor(player: Player) deprecated
API
Methods
Play
Play(sfx: SoundEffect|string|int) : void
Plays a built-in sound effect at full volume for everyone in the place.
play
play(sfx: SoundEffect|string|int) : void deprecated
Identical to Play.
No longer recommended for use.
PlayAt
PlayAt(sfx: SoundEffect|string|int, x: number, y: number, z: number) : void
Plays a built-in sound effect at a world position. Clients attenuate by distance.
playAt
playAt(sfx: SoundEffect|string|int, x: number, y: number, z: number) : void deprecated
Identical to PlayAt.
No longer recommended for use.
PlayMusic
PlayMusic(url: string, volume: number?) : void
Plays looping BGM for everyone in the place.
volume is 0 to 1 (default 0.5).
Upload .ogg loops from My Places, Edit, Place music, then paste the hosted URL here.
playMusic
playMusic(url: string, volume: number?) : void deprecated
Identical to PlayMusic.
No longer recommended for use.
StopMusic
StopMusic() : void
Stops place-wide BGM started with PlayMusic.
stopMusic
stopMusic() : void deprecated
Identical to StopMusic.
No longer recommended for use.
PlayMusicFor
PlayMusicFor(player: Player, url: string, volume: number?) : void
Plays looping BGM for one player only.
Same as `Player:PlayMusic`.
playMusicFor
playMusicFor(player: Player, url: string, volume: number?) : void deprecated
Identical to PlayMusicFor.
No longer recommended for use.
StopMusicFor
StopMusicFor(player: Player) : void
Stops BGM for one player.
Same as `Player:StopMusic`.
stopMusicFor
stopMusicFor(player: Player) : void deprecated
Identical to StopMusicFor.
No longer recommended for use.
