setSoundLooped
Shared
Turns looping on or off for a sound. On the server, the change is sent to every client.
bool setSoundLooped(sound sound, bool looped)
Parameters
| Name | Type | Description |
|---|---|---|
| sound | sound | The sound element. On the client a dui element also works, for the browser's sound. |
| looped | bool | true to play the sound again when it ends. |
Returns
true if it changed, false if the sound was already set that way or was not found.
Example
local music = playSound("sounds/track.mp3")
setSoundLooped(music, true)