M MY Multiplayer: Wiki
Side
Kind

setSoundSpeed

Shared

Changes a sound's speed. The pitch changes with it. On the server, the change is sent to every client.

bool setSoundSpeed(sound sound, float speed)

Parameters

NameTypeDescription
soundsoundThe sound element. On the client a dui element also works, for the browser's sound.
speedfloatThe speed, where 1 is normal. It goes up to 16; 0 or less plays at normal speed.

Returns

true if the sound was found, false otherwise.

Example

local music = playSound("sounds/track.mp3")
setSoundSpeed(music, 1.25)

See also