Client
Manipulate the sound
Play
local soundId = exports['mx-surround']:Play(soundId, url, coords, loop, volume, panner)With 1.8.5 players who are far away from the song will not be able to get the maxDuration and timeStampof the song! If you want the far away player to get the maxDuration, you must use server side export
Parameters
soundId?:
stringIf not provided, will be created automatically
url:
stringcoords?:
vector3If not provided, its means that the sound is not dynamic. So player can hear it from everywhere
loop?:
booleanvolume?:
numberOverride default volume (even if sound profile is enabled) (0.0 | 1.0)
panner?:
PannerNode
Returns
soundId | false
Play Async
Attach To Entity
Parameters
soundId:
stringnetworkId:
number
Detach From Entity
Parameters
soundId:
string
Attach To Player
Parameters
soundId:
stringplayerId:
number
Detach From Player
Parameters
soundId:
string
Stop
Parameters
soundId:
string
Pause
Parameters
soundId:
string
Resume
Parameters
soundId:
string
Destroy
Parameters
soundId:
string
Destroy All
Repeat
Parameters
soundId:
string
Add Filter
Parameters
soundId:
stringtype:
stringfilter:
{frequency: number, Q: number, gain:number}
Remove Filter
Parameters
soundId:
string
To better manage sounds, see these three section
SetGetHandlersLast updated
Was this helpful?