playSoundFrontEnd
Server
Plays a game interface sound for a player, or for every player inside an element, such as root.
Also exists on the client, with its own implementation: playSoundFrontEnd
bool playSoundFrontEnd(element element, int sound)
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | A player, or an element whose child players hear the sound. |
| sound | int | The sound id, from 0 to 101. |
Returns
true if element is a player. With any other element the sound reaches the players inside it but the function returns false; also false if the sound is outside 0 to 101.
Example
addEventHandler("onPlayerJoin", root, function()
playSoundFrontEnd(root, 1)
end)