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
exports['mx-surround']:PlayAsync(soundId, url, coords, loop, volume, panner)Attach To Entity
exports['mx-surround']:attachEntity(soundId, networkId)Parameters
soundId:
stringnetworkId:
number
Detach From Entity
exports['mx-surround']:detachEntity(soundId)Parameters
soundId:
string
Attach To Player
exports['mx-surround']:attachPlayer(soundId, playerId)Parameters
soundId:
stringplayerId:
number
Detach From Player
exports['mx-surround']:detachPlayer(soundId)Parameters
soundId:
string
Stop
exports['mx-surround']:Stop(soundId)Parameters
soundId:
string
Pause
exports['mx-surround']:Pause(soundId)Parameters
soundId:
string
Resume
exports['mx-surround']:Resume(soundId)Parameters
soundId:
string
Destroy
exports['mx-surround']:Destroy(soundId)Parameters
soundId:
string
Destroy All
exports['mx-surround']:destroyAllSounds()Repeat
exports['mx-surround']:repeatSound(soundId)Parameters
soundId:
string
Add Filter
exports['mx-surround']:addFilter(soundId, type, filter)Parameters
soundId:
stringtype:
stringfilter:
{frequency: number, Q: number, gain:number}
Remove Filter
exports['mx-surround']:removeFilter(soundId)Parameters
soundId:
string
To better manage sounds, see these three section
SetGetHandlersLast updated
Was this helpful?