How do I make a sound softly disappear when the user goes away?

Hi, I made a big block that makes a sound every time, but I want when the user moves away from the block that the sound gently disappears, I don’t know how to approach it, thanks!

If this is the wrong category, please tell me the right category for this, thank you.

2 Likes

Doesn’t roblox already do this?

I think no… But you know how to make it softly disappear??

2 Likes

(If i’m not mistaken) Roblox does already do this… see this post right here for more details / info:

It’s the distance at which a sound will start to decrease volume.

3 Likes

It’s not working… Please help…

If you have a custom sound system, you could use tween service to smoothly fade out the sound.

local TweenService = game:GetService(“TweenService”)
local TweenSettings = TweenInfo.new(2, Enum.TweenInfo.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0)
local Sound = SoundDirectory
local Tween = TweenService:Create(Sound, TweenSettings, {Volume = 0}
Tween:Play()

If the player’s character is far enough from the part, that’s when the tween will play. You will have to create loop that will constantly check if the player’s character is within a certain distance.

Im currently on my phone, so I’m not entirely Marie if this is right.

2 Likes

Okay, I’ll try that, thanks!

TAGS: Heart BTN not working.