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

Are there any ways to limit the range of this sound?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Are there any ways to limit a sound to a certain distance when the sound is in a Local script?

The sound's file location is as follows Tool LocalGui Sound1 Sound2 Handle

Currently the script I have is: if key == "k" then script.Sound1:Play() print("Sound1- Check")

(Which works)

Do I have to do this:

local maxDist=30 if key == "k" then if dist <= maxDist then local c = Sound1:Clone() table.insert(sounds, c) c.Parent = v.PlayerGui
script.Sound1:Play() print("Sound1 - Check")

Answer this question