Custom Jump Sound Not Working

Ok so I’m testing stuff for my game and it is not doing that well. The Fortunate bit is, the walking sound works. But the unfortunate bit is that the Jump sound doesn’t work for some reason. Here is an error pop up.


As you can see it says failed to download swoosh.wav.

Here is the walking sound script
image

Script in it is:

– util

function waitForChild(parent, childName)

while true do

local child = parent:findFirstChild(childName)

if child then

return child

end

parent.ChildAdded:wait()

end

end

function newSound(id)

local sound = Instance.new(“Sound”)

sound.SoundId = id

sound.Parent = script.Parent.Head

return sound

end

– declarations

local sDied = newSound(“rbxasset://sounds/uuhhh.wav”)

local sFallingDown = newSound(“rbxasset://sounds/splat.wav”)

local sFreeFalling = newSound(“rbxasset://sounds/swoosh.wav”)

local sGettingUp = newSound(“rbxasset://sounds/hit.wav”)

local sJumping = newSound(“rbxassetid://5151602926”)

local sRunning = newSound(“rbxasset://sounds/bfsl-minifigfoots1.mp3”)

sRunning.Looped = true

local Figure = script.Parent

local Head = waitForChild(Figure, “Head”)

local Humanoid = waitForChild(Figure, “Humanoid”)

– functions

function onDied()

sDied:play()

end

function onState(state, sound)

if state then

sound:play()

else

sound:pause()

end

end

function onRunning(speed)

if speed>0 then

sRunning:play()

else

sRunning:pause()

end

end

– connect up

Humanoid.Died:connect(onDied)

Humanoid.Running:connect(onRunning)

Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)

Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)

Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)

Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)

As you can see the local sJumping = newSound(“rbxassetid://5151602926”) was edited by me. This script was from the March 2007 ROBLOX client. I don’t know if that made it glitch out but I would appreciate help to fix the issue and remove the error in the developer console.

1 Like

Did you try to do this in a roblox game and not studio?

I tried this in studio. But this was a test my real game was the same issue still.

This error is occurring because swoosh.wav is no longer a valid sound on the Roblox website, I would recommend removing it entirely or finding a different sound to fit its place. I believe the custom jumping noise is getting cancelled out by swoosh.wav not loading successfully, because swoosh.wav is getting called milliseconds after the jumping noise plays. If after all of this your custom jumping noise still isn’t working, then it’s either a problem with the volume of the sound, or most likely a problem with the audio itself, and you should find a different one in that case. I would recommend print debugging to see if the jumping noise is actually getting played or not.

1 Like