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
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.