Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Advice for local audio?

So since I don't know much about audio on ROBLOX; I was wondering, how do you add audio into your game? I'm not talking about songs when a player joins in, but rather a local noise that you hear only when you get closer to the source.

For Example:

The closer you walk towards the washing machine the louder the sound becomes.

Is there a way to manipulate the distance you have to be before you start hearing the noise? Thank you for helping.

1 answer

✓ Accepted answer

You can begin by placing the sound in the StarterGui or backpack. Using Magnitude you can determine the player's distance from whatever the source is and you can change the volume for the player accordingly.

4 comments

1

Well crap, looks like I'm going to have to learn more in-depth about Vector Values and their formulas. Thank you.

0

No problem. Glad to have helped.

0

An easier way is to just put the sound inside a part, then the sound will be attached to the part and Roblox will handle the rest of it.

0

Not quite because you wouldn't be able to control the volume level as much. If he wants to be able to hear it from very far away or not very far away, it would be impossible to control this.

This discussion is preserved as it was. New answers, comments, and votes are closed.