Free-fall sound never plays

Repro steps:

  • Open a Baseplate
  • Start a playtest
  • Manually set your character’s CFrame very high up so that you fall for a while

Expected behavior:
Given that the sound action_falling.mp3 exists in the Roblox files, you should hear a “whooshing” of wind as you are falling.

Actual behavior:
A mistake in the RbxCharacterSounds script prevents the FreeFall sound from playing.

On line 159, we see the function that gets called when the player’s Humanoid changes to the FreeFall state:

...
[Enum.HumanoidStateType.Freefall] = function()
	sounds.FreeFalling.Volume = 0
	stopPlayingLoopedSounds(sounds.FreeFalling)
	playingLoopedSounds[sounds.FreeFalling] = true
end,
...

Oddly, the sound’s Volume is set to 0. However, this is intentional, as the Volume is meant to be proportional to the player’s Velocity, and is changed later by another function (line 210):

-- updaters for looped sounds
local loopedSoundUpdaters: {[Sound]: (number, Sound, Vector3) -> ()} = {
	[sounds.Climbing] = function(dt: number, sound: Sound, vel: Vector3)
		local velocity = if FFlagUserSoundsUseRelativeVelocity then getRelativeVelocity(cm, vel) else vel
		sound.Playing = velocity.Magnitude > 0.1
	end,

	[sounds.FreeFalling] = function(dt: number, sound: Sound, vel: Vector3): ()
		if vel.Magnitude > 75 then
			sound.Volume = math.clamp(sound.Volume + 0.9*dt, 0, 1)
		else
			sound.Volume = 0
		end
	end,
...
}

And, we can observe in-game that the Sound itself, HumanoidRootPart.FreeFall, will have a non-zero Volume while our Velocity exceeds 75 studs/s.

The issue is, is that the state transition handler, the first snippet I showed, never plays the sound. Every other transition handler either sets .Playing directly, or calls playSound, which plays it from the beginning by setting the TimePosition to 0 and setting .Playing to true. Therefore, either of these will work as a resolution, the fix is a one-liner:

...
[Enum.HumanoidStateType.Freefall] = function()
	sounds.FreeFalling.Volume = 0 -- This line could technically be removed
	sounds.FreeFalling.Playing = true -- THE FIX
	stopPlayingLoopedSounds(sounds.FreeFalling)
	playingLoopedSounds[sounds.FreeFalling] = true
end,
...

Workaround: Fork the RbxCharacterSounds script to fix it yourself. It is located at Players.<Player Name>.PlayerScripts.RbxCharacterSounds. Here is a demo of the fixed version:

Frequency: Always

If you’ve been reading extra carefully, recall what the LocalScript’s playSound function does, from 672 characters ago:

plays it from the beginning by setting the TimePosition to 0 and setting .Playing to true

Putting this extra attention to use, you will realize this code is so old, it appears to predate the Sound:Play function, which does exactly what playSound is doing, or at least deliberately chooses not to use it, for whatever reason.

10 Likes

Wow, a Roblox feature we never even knew about because of a bug. Nice catch!

5 Likes

This existed for a long time but I haven’t heard the freefall sound in a while
Made it work in my game though

3 Likes

Nice, I didn’t even know this was a thing, I made my own freefall sound.

1 Like

I wonder if someone at Roblox decided that it didn’t sound that great and created this bug on purpose to disable it.

I tried this out, and its not bad, not great.

The loop isn’t seamless so if you fall for a long time you’ll hear the loop restart.

The volume doesn’t fade in and out smoothly when you go from fast to stopped then falling again. There is more of an abrupt stopping of the sound.

I made a seamless version of this sound with Audacity if anybody wants it:

(idk why but the mp3 version of wouldn’t loop properly so I uploaded as ogg)

4 Likes

I think it adds some nice ambiance, instead of the pure silence, but yeah, the looping could be fixed. I also think that it’s a little too quiet, and is practically imperceptible on speakers.

1 Like

Thanks for the report! I filed a ticket in our internal database.

1 Like

Yes, I agree it is too quiet also. (but I like my sound effects on the loud side, mine in my game may be too loud, haha).

I suppose they never imagined anyone could fall longer than 8 seconds so the sound file was made with a beginning and end, not as a loop.

Still appears to be an issue, will someone address this?

1 Like