Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Advice for local audio?

Asked by
AmVolt 60
9 years ago

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

Log in to vote
1
Answered by 9 years ago

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.

1
Well crap, looks like I'm going to have to learn more in-depth about Vector Values and their formulas. Thank you. AmVolt 60 — 9y
0
No problem. Glad to have helped. FearMeIAmLag 1161 — 9y
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. GoldenPhysics 474 — 9y
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. FearMeIAmLag 1161 — 9y
Ad

Answer this question