Can't change default sounds for player

I’m trying to change the default walking sounds (Walking, running, jumping, landing, and all that jazz), but whenever I play the game it says,

“Failed to load sound rbxasset://1110489303: Unable to download sound data”

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAppearanceLoaded:Connect(function(Character)
		task.wait()
		local Humanoid = Character:WaitForChild("HumanoidRootPart")
		local Death = Humanoid:WaitForChild("Died")
		local Standup = Humanoid:WaitForChild("GettingUp")
		local Jump = Humanoid:WaitForChild("Jumping")
		local land = Humanoid:WaitForChild("Landing")
		local run = Humanoid:WaitForChild("Running")
		local splash = Humanoid:WaitForChild("Splash")
		local swim = Humanoid:WaitForChild("Swimming")
		
		Death.SoundId = "rbxassetid://7456890019"
		Standup.SoundId = "rbxasset://sounds/action_get_up.mp3"
		Jump.SoundId = "rbxassetid://379482972"
		land.SoundId = "rbxassetid://7534134750"
		run.SoundId = "rbxassetid://7002934832"
		splash.SoundId = "rbxassetid://8031010108"
		swim.SoundId = "rbxassetid://1110489303"

	end)
end)

I’ve tried on both localscript and server script, but it still seems to not work. I am new to scripting and tried to figure it out, but then again I am new and most likely did something wrong lol.

This means that the soundId is invalid, aka you need to find a different one. And-or it’s an invalid sound Id. Otherwise, pretty good script. ServerScript should be used for this as you want all players to hear those sounds.

Another method to make your scripting better is to use a for loop
For example

local Sounds = {
   ["Died"] = "rbxassetid://432483432",
   ["SoundToChange"] = "rbxassetid://yoursoundid"
}

game.Players.PlayerAdded:Connect(function(plr)
   plr.CharacterAdded:Connect(function(char)
    for i,v in pairs(Sounds) do
       if char:FindFirstChild(i) then
            char:FindFirstChild(i).SoundId = v 
       end
    end
  end
end

Essentially how it works is. There’s a table, it uses a for loop. It checks if the i part. (The index) for example the first entry’s index is “Died.” It checks if it can find a child of a character named “Died” If it can, it sets the soundId to the Value for that entry. Then it repeats for all the entries and sees if it can find the child.

I was able to finally get what I needed. I followed this tutorial and it did exactly what I was needing. Thank you for your help! :slight_smile:

1 Like