Server
Manipulate the sound
Last updated
Was this helpful?
Manipulate the sound
Last updated
Was this helpful?
This export is a synchronous function, which means that this code returns a soundId to you. And if sound is not created, it returns false
source:
number
You can pass -1 for sync
soundId?:
string
If not provided, will be created automatically
url:
string
coords:
vector3
Unlike the client side the coords param is required on the server side
loop?:
boolean
volume?:
number
Override default volume (even if sound profile is enabled)
panner?:
PannerNode
soundId | false
This export does not return the soundId compared to the above. However, it works faster and you can connect the sound directly to an entity or player at startup. Very useful for asset sounds
It should only be used for asset sounds, DO NOT use it for youtube, spotify and soundcloud!
source:
number
You can pass -1 for sync
soundId?:
string
If not provided, will be created automatically
url:
string
coords:
vector3
Unlike the client side the coords param is required on the server side
loop?:
boolean
volume?:
number
Override default volume (even if sound profile is enabled)
panner?:
PannerNode
data?:
{ attachEntity: number, attachPlayer: number }
source:
number
soundId:
string
source:
number
soundId:
string
source:
number
soundId:
string
Parameters
source:
number
soundId:
string
source:
number
soundId:
string
networkId:
number
source:
number
soundId:
string
source:
number
soundId:
string
playerId:
number
source:
number
soundId:
string