Sound System [NEED HELP]

So I have this two scripts, local and Server and connected by remote event fire server, I want to when I click the button, not only me , but people NEAR me can hear it, but people who’s far from can’t hear it, how can I do it?

This is my latest script

— Local Script
local event = game.ReplicatedStorage.SoundSys
local gun_sound = script.Parent.Sound1
Button.MouseButton1Click:Connect(function()
event:FireServer(gun_sound)
end)

— Server Script

local event = game.ReplicatedStorage.SoundSys
event.OnServerEvent:Connect(function(player, sound)
sound:Play()
end)

Please help me, thank you.

1 Like

Sorry for not so neat, I write with my phone not computer.

If you put the sound object inside a part (ie. one of the character’s body part), I believe it is louder the closer you are to it.

You could do this
The sound must be parent in a part and require a server script to play the sound, if you use local script to play the sound, you will won’t hear it.
image

Set RollOffMaxDistance to any numbers you’d like to (Max distance the sound can be heard)

Set RollOffMinDistance to any numbers you’d like to (Min distance the sound can be heard)

For RollOffMode, i recommend you to set it to LinearSquare, which are the best sound setup in my option

More volume = louder when closer

1 Like

If I want to parent to Tools part I can right?

Yes you could.
Sorry for late reply

So if I use my first script, the one that I posted. Do you think other player gonna hear too? Or no?

Yes (The Server Script parts). i tried it out by myself before

So i suppose then i just need to change the property?