Skip to main content

Sounds

Contains functions to play audio clips.

Functions

play(target, clipName, asyncMode)

Plays the specified audio clip on a given player(s) device.

Parameters

  • target Either the target Player, client ID of the target player, or Players.All to target all players.
  • clipName The name of the audio clip to play.
  • asyncMode The AsyncMode which determines whether the task should wait for the function to complete before continuing.

Example

Play a robotic hello audio clip.

function onStart()
Sounds.play(Players.All, "voice.male.robotic.hello.1")
end
Result