M MY Multiplayer: Wiki
Side
Kind

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

NameTypeDescription
soundsoundThe sound element. On the client a dui element also works, for the browser's sound.
loopedbooltrue 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)

See also