Disable character sounds

I tried to disable character sound by changing id to 0 and its server script wich I want to hide sound for everyone here’s the full code its in server script service too!
And this is a custom character meaning I don’t think its gonna work?

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		-- disable walking sound
		local humanoid = character:WaitForChild("Humanoid")
		humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
			if humanoid.WalkSpeed == 0 then
				for _,sound in pairs(character:GetDescendants()) do
					if sound:IsA("Sound") and sound.SoundId == "rbxassetid://0" then
						sound.Playing = false
					end
				end
			end
		end)

		-- disable jumping sound
		local soundGroups = character:WaitForChild("SoundGroups")
		local jumpGroup = soundGroups:WaitForChild("Jump")
		jumpGroup.Volume = 0

		-- disable falling sound
		local fallGroup = soundGroups:WaitForChild("Fall")
		fallGroup.Volume = 0

		-- disable getting up sound
		humanoid:GetPropertyChangedSignal("State"):Connect(function()
			if humanoid:GetState() == Enum.HumanoidStateType.GettingUp then
				for _,sound in pairs(character:GetDescendants()) do
					if sound:IsA("Sound") and sound.SoundId == "rbxassetid://348771464" then
						sound.Playing = false
					end
				end
			end
		end)
	end)
end)

You can remove the sounds like this, it’s much easier!

This script removes the player’s sound for the other players:

local players = game:GetService("Players")
players.PlayerAdded:Connect(function(player)
	local character = workspace:WaitForChild(player.Name)
	local humanoid = character:WaitForChild("HumanoidRootPart")
	for i,v in pairs(humanoid:GetChildren()) do
		if v:IsA("Sound") then
			v:Destroy()
		end
	end
end)

This localscript removes sound for the client (place in starterplayerscripts):

local players = game:GetService("Players")
local player = players.LocalPlayer or players.PlayerAdded:Wait()
local character = player.Character
local hrp = character.HumanoidRootPart
for i,v in pairs(hrp:GetChildren()) do
	if v:IsA("Sound") then
		v:Destroy()
	end
end

What I do is simply going through the sound location and deleting every item that is a sound, and that for both the client and the server, so that no one can hear themselves or each other.

sound still hears and btw its custom character but the same and I still hear the sound
Players.danodanya12Beta21.PlayerScripts.nosound:4: attempt to index nil with ‘HumanoidRootPart’

for _,v in HumanoidRootPart:GetDescendants() do 
    if v:IsA("Sound") then
      v:Stop() 
      v:Destroy()
   end
end
1 Like

that also dont work for me since its custom character

Where are the sounds located then?

1 Like

it automaticly is created in humanoidrootpart custom character from roblox but trying to delete the sound in humanoidrootpart from the player but since its custom character it don’t worK?

im using a custom character so it wont probally work

How? It should delete all sounds in humanoidrootpart.

still doesnt work and its custom character but its called humanoidrootpart so I think this is a bug or something wrong and the avatar is literally the same and its r6 so I don’t think its the character maybe some bugs to get fixed or what it can be and using script will worK? and where would I even put it

show a screenshot where it shows the sounds.

wait nvm its fixed but will it hear for everyone or not server

Nobody will hear it.

1 Like

yes they do i tried i still hear other people sound so hows this gonna get fixed or script wich?!?!?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.