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

How do I allow Sound to only be played in Certain Areas? (Include the Scripts in Answer)

I have tried the general way of adding in a sound but with a bit of a change. I inserted a Sound into a Part and did all I needed there. Then I added a local script to the Sound. In the Local Script I typed the Sound Script. (Sorry I can't find my note pad so I can't type the script.) And when I tested it, I did not hear any Sound.

Sorry I am very new to Scripting. If anyone answers please make it as detailed as possible. I apologize for not having the Script, but I know it was something like 'game. Workspace. Sound()'.

1 comment

0

That would help a lot. Thank you so much.

3 answers

The best way to do this is make a brick have the sound inside of it, and make the MaxDistance value to your liking's. I do not think there is another way to do this, I mean, there probably is but this is probably the easiest way to do it.

Use this youtube video: https://www.youtube.com/watch?v=AI5OoyCwbu4 he does a good job with the sound scripting etc. I suggest however you start learning to script via roblox api or roblox wiki. Make a plan of what you are going to do and the key elements involved. Example if i was doing a health script, the main parts are the Humanoid, the gui that the player would see and the type of script needed (local or normal) then research on those key compo nets and their properties. Only post questions if you have tried to script/ made a attempt. This is scripting helpers! not givers!.

2 comments

0

I did make a script attempt...

0

then where is the script in your question?

I do have my own sound block if you'd like me to post the code here. I can also explain how it works within the script as well if you'd like.

2 comments

0

You should've posted this as a comment, as this is no answer to the post.

0

He couldn't. You need rep to post comments. However, I agree this shouldn't have been posted.

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