PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

SoundService

Show deprecated

SoundService

Show deprecated

A service that determines various aspects of how Sounds play in the game. SoundService is also often used to store SoundGroups although this is not mandatory for SoundGroups to work.

What can SoundService do?

SoundService properties such as SoundService/AmbientReverb, SoundService/DistanceFactor, SoundService/DopplerScale and SoundService/RolloffScale can be used to change how all Sounds play in the game.

The SoundService/SetListener function allows developers to set the position where sounds are heard from.

SoundService/PlayLocalSound can be used to play a sound locally regardless of where it is parented to.

Developers looking to find out more about how sound works in Roblox should consult the documentation provided for the FMOD sound engine.

Properties

ReverbType

AmbientReverb

The ambient sound environment preset used by SoundService.

float

DistanceFactor

The number of studs to be considered a meter by SoundService when calculating 3D Sound volume attenuation.

float

DopplerScale

This property determines the degree to with a 3D Sounds pitch varies due to the Doppler effect.

bool

RespectFilteringEnabled

Sets whether Sound playback from a client will replicate to the server.

float

RolloffScale

Sets how fast 3D Sound volume attenuates, or ‘rolls off’.

Functions

Tuple

GetListener ( )

GetListener returns SoundServices current listener type and what is set as listener.

void

PlayLocalSound ( Instance sound )

Plays a Sound locally, meaning the sound will only be heard by the client calling this function, regardless of where it’s parented to.

void

SetListener ( ListenerType listenerType , Tuple listener )

Sets the listener for the SoundService.

Events