What are you trying to achieve?
I want to make a way for my trains to play different sounds as it speeds up or slows down and possibly add a better ‘fade’ effect. Currently, I have a script that uses Velocity.Magnitude from a part on the train and it plays only one sound on a loop until it reaches 40, where it stops intentionally.
What is the issue?
My script isn’t working as properly as it should. One thing I mean is that the volume increases too slowly when the train starts to move and doesn’t get loud enough until it’s at speed, which is unfortunately, after 40. People have also reported instances of faintly hearing the accelerating sounds when the train is completely stopped.
Another thing is like I said earlier, I want to add different sounds that play at different speeds (for example, if the train is going from 0 to 10, play a low-pitched motor sound (completely different sound or the same sound just at a different pitch) and then when it goes from 10 to 20, it plays a medium-pitched sound and so on. It would reverse this order when slowing down). However, I’m not that knowledgeable in scripting and I don’t know how to do this properly.
What solutions have you tried so far?
I have tried hiring other scripters (the ones I’m paired up with for my game’s development don’t specialize in sound scripts) but I got none. I looked at the Wiki for answers, but like I said, I can’t script very well and barely understood what it told me, even if it was what I was looking for.
Further details?
An example of the sound script I want is at 0:41 of this video: https://www.youtube.com/watch?v=7zhylhtkKXc. If you listen, you can hear the different pitched motor whines as it speeds up.