Default sounds wont show up in my character

So, I’m trying to add custom sounds to match with the walking and running animations in my game but the default sounds aren’t there (e.g. image)

I know my script works because its the same one my friend uses that he made for his game and it works fine. So how can I fix this?

Can you show us your script? And what isn’t working, exactly?

check humanoid, all sounds associated with movement are there. not in humanoidrootpart (when game is running they are automatically generated)

*edit check humanoid root part

local Humanoid = script.Parent:FindFirstChild("Humanoid")
local Walk = script.Parent.HumanoidRootPart:FindFirstChild("Running")

local PitchShifter = Instance.new("PitchShiftSoundEffect")
PitchShifter.Parent = Walk

while true do
	wait()

	if Humanoid then
		if Humanoid.FloorMaterial == Enum.Material.Grass then
			Walk.SoundId = "rbxassetid://379483672"
			Walk.PlaybackSpeed = Humanoid.WalkSpeed / 4.5
			PitchShifter.Octave = Walk.PlaybackSpeed / Humanoid.WalkSpeed
			Walk.Volume = 3
		elseif Humanoid.FloorMaterial == Enum.Material.Concrete then
			Walk.SoundId = "rbxassetid://5639243489"
			Walk.PlaybackSpeed = Humanoid.WalkSpeed / 6.5
			PitchShifter.Octave = Walk.PlaybackSpeed / Humanoid.WalkSpeed
			Walk.Volume = 1
		elseif Humanoid.FloorMaterial == Enum.Material.Mud or Humanoid.FloorMaterial == Enum.Material.Ground then
			Walk.SoundId = "rbxassetid://6877211799"
			Walk.PlaybackSpeed = Humanoid.WalkSpeed / 7
			PitchShifter.Octave = Walk.PlaybackSpeed / Humanoid.WalkSpeed
			Walk.Volume = 0.5
		elseif Humanoid.FloorMaterial == Enum.Material.Asphalt then
			Walk.SoundId = "rbxassetid://6877172980"
			Walk.PlaybackSpeed = Humanoid.WalkSpeed / 7
			PitchShifter.Octave = Walk.PlaybackSpeed / Humanoid.WalkSpeed
			Walk.Volume = 1
		elseif Humanoid.FloorMaterial == Enum.Material.Wood or Humanoid.FloorMaterial == Enum.Material.WoodPlanks then
			Walk.SoundId = "rbxassetid://379484117"
			Walk.PlaybackSpeed = Humanoid.WalkSpeed / 8
			PitchShifter.Octave = Walk.PlaybackSpeed / Humanoid.WalkSpeed
			Walk.Volume = 0.5
		else
			Walk.SoundId = "rbxassetid://833564121" -- default
			Walk.PlaybackSpeed = Humanoid.WalkSpeed / 8
			PitchShifter.Octave = Walk.PlaybackSpeed / Humanoid.WalkSpeed
			Walk.Volume = 2
		end
	end
end

edit: The script is working fine its just the sounds on my character have disappeared and this happens in all my gmaes

Not in either and its Default sounds I’m looking for

image

the only reason why it wouldn’t be there is that you change them to begin with in one of your scripts. if you open a new default place in studio and test, sounds will be in humanoid

I just created the place like 30 mins ago and didnt mess with any sounds its been like that since i created it.

Edit: i started a new game and yea 1. its in the HRP 2. the sounds are there image

I’m in a new baseplate right now and I don’t see any sounds in my Humanoid object, they’re inside the HumanoidRootPart.

1 Like

Try using a :WaitForChild() instead of a FindFirstChild function. Your sound objects could be getting added in after your script checks for the sounds, using a :WaitForChild() should solve that.

1 Like

That won’t work because the sounds don’t appear in the first place. All this will cause is an infinite yield.

@Foshizled something must have been done to change the default audio of your character when going in game. Try looking through your StarterPlayer Folder for anything odd.

yes thank you for correcting–it is in humanoidrootpart. point still stands though as he complained the sounds did not exist to begin with

1 Like

Ah, sorry about that. I got confused when they uploaded a picture of the HRP with sounds inside of it. Didn’t read the text above the image beforehand

Nothing out of the ordinary over my way Mister. Sir.

image

What’s inside the Sound and Running scripts?

Sound is the sound script from @CapnFry :

local Humanoid = script.Parent:FindFirstChild("Humanoid")
local Walk = script.Parent.HumanoidRootPart:FindFirstChild("Running")

local PitchShifter = Instance.new("PitchShiftSoundEffect")
PitchShifter.Parent = Walk

while true do
	wait()

	if Humanoid then
		if Humanoid.FloorMaterial == Enum.Material.Grass then
			Walk.SoundId = "rbxassetid://379483672"
			Walk.PlaybackSpeed = Humanoid.WalkSpeed / 4.5
			PitchShifter.Octave = Walk.PlaybackSpeed / Humanoid.WalkSpeed
			Walk.Volume = 3
		elseif Humanoid.FloorMaterial == Enum.Material.Concrete then
			Walk.SoundId = "rbxassetid://5639243489"
			Walk.PlaybackSpeed = Humanoid.WalkSpeed / 6.5
			PitchShifter.Octave = Walk.PlaybackSpeed / Humanoid.WalkSpeed
			Walk.Volume = 1
		elseif Humanoid.FloorMaterial == Enum.Material.Mud or Humanoid.FloorMaterial == Enum.Material.Ground then
			Walk.SoundId = "rbxassetid://6877211799"
			Walk.PlaybackSpeed = Humanoid.WalkSpeed / 7
			PitchShifter.Octave = Walk.PlaybackSpeed / Humanoid.WalkSpeed
			Walk.Volume = 0.5
		elseif Humanoid.FloorMaterial == Enum.Material.Asphalt then
			Walk.SoundId = "rbxassetid://6877172980"
			Walk.PlaybackSpeed = Humanoid.WalkSpeed / 7
			PitchShifter.Octave = Walk.PlaybackSpeed / Humanoid.WalkSpeed
			Walk.Volume = 1
		elseif Humanoid.FloorMaterial == Enum.Material.Wood or Humanoid.FloorMaterial == Enum.Material.WoodPlanks then
			Walk.SoundId = "rbxassetid://379484117"
			Walk.PlaybackSpeed = Humanoid.WalkSpeed / 8
			PitchShifter.Octave = Walk.PlaybackSpeed / Humanoid.WalkSpeed
			Walk.Volume = 0.5
		else
			Walk.SoundId = "rbxassetid://833564121" -- default
			Walk.PlaybackSpeed = Humanoid.WalkSpeed / 8
			PitchShifter.Octave = Walk.PlaybackSpeed / Humanoid.WalkSpeed
			Walk.Volume = 2
		end
	end
end

then the running is my run script:

local UIS = game:GetService('UserInputService')
local Player = game.Players.LocalPlayer
local Character = Player.Character

UIS.InputBegan:connect(function(input)
	if input.KeyCode == Enum.KeyCode.LeftShift then
		Character.Humanoid.WalkSpeed = 30
		local Anim = Instance.new('Animation')
		Anim.AnimationId = 'rbxassetid://7491290391'
		PlayAnim = Character.Humanoid:LoadAnimation(Anim)
		PlayAnim:Play()
	end
end)

UIS.InputEnded:connect(function(input)
	if input.KeyCode == Enum.KeyCode.LeftShift then
		Character.Humanoid.WalkSpeed = 13
		PlayAnim:Stop()
	end
end)

Do you have any viruses in your game that could be affecting this? Try looking through plugins and free models.

It was some weird thing in studio