Is possible somehow make Scrolling Sound in Scrolling-Frame?

Good Day

(Short Feedback)
I have question is somehow possible to add to ScrollingFrame Scrolling Sound? I don’t have no idea…

Thank You.

2 Likes

What do you mean by scrolling sound? Like a scrolling bar to change the sound position?

1 Like

Yes it is.

What you can do is to make a looping click. Then when the scrollbar.CanvasPosition changes you can detect that and play the sound. I recommend also finding the delta to modify the sound.

(You can use speed or pitch)

I made something similar but wih motors instead. I played a motor sound when a hinge moved. And I used this method.

3 Likes

You could try using the MouseEnter event on the scrolling frame and check to see if the x and y parameters are over the scrolling bar, then listen for the MouseButton1Down event to check when left click is being pressed and held down.

1 Like
local ScrollingFrame = -- Locate the scroll bar here
local Sound = -- Locate the sound here

ScrollingFrame:GetPropertyChangedSignal("CanvasPosition"):Connect(function() -- When scrolled in ScrollingFrame
    Sound:Play() -- Play the sound
end)
3 Likes

it does work , but sound ended up spamming . how do i avoid that? by debounce?

yes by debounce !

thanks , im not good at scripting , ill try it
debounce kinda hard to understand

ok here i did it works well
play sound when scrolling with debounce

local ScrollingFrame = -- Locate the scroll bar here
local Sound = -- Locate the sound here


local debounce = false
local function playSound()
	if debounce then return end
	debounce = true
	Sound:Play()
	Sound.Ended:Wait()
	wait(0.3) -- delay 
	debounce = false
end

ScrollingFrame:GetPropertyChangedSignal("CanvasPosition"):Connect(playSound)```

make sure to make this the solution! So people can see in the future

Bro that acc ( mine ) got terminated