I want to apply an effect to the sound when moving to a specific location.

Hello

As an object moves to a specific position
I would like to have an effect applied gradually as an object is moved to a specific position.
How can I create such a function?

(I am not familiar with English, so sorry if my writing is not correct.)