Removing default Roblox footsteps

So,
I am making an FPS game and i made a script that adds custom
footstep sounds but, i can still hear the roblox default footstep sounds.
I’ve tried to remove it by searching where is it located and deleting it,
and i discovered that the footstep sounds are automatically replicated to the
Character’s HumanoidRootPàrt.
I tried making a script that deletes it, but seems like the “Running” Audio is not
visible to scripts and neither to Localscripts.

Can anyone help?

6 Likes

You could use a for loop to to check the HumanoidRootPart descendants when a player joins.


local players = game:GetService("Players")
players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        local descendants = character.HumanoidRootPart:GetDescendants()
        for i, v in pairs(descendants) do
            if v:IsA("Sound") then
                v:Destroy()
            end
        end
    end)
end)
1 Like

Did not work, seems like the default sounds are not visible to scripts

local Character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()

local descendants = Character.HumanoidRootPart:GetDescendants()
for i, v in pairs(descendants) do
    if v:IsA("Sound") then
        v:Destroy()
    end
end

Should be fixed now.

Local script > StarterCharacterScripts.

1 Like

It works but they are just removed from the client, and not from the server

I fixed it by changing the HumanoidRootPart’s name to HumanoidRoot

If it’s inside StarterCharacterScripts, you can access the player’s character by simply doing script.Parent, since scripts inside here are parented to the player’s character. I should also add that using WaitForChild on the HumanoidRootPart is a good idea.

This is all you need:

local Character = script.Parent
local RootPart = Character:WaitForChild("HumanoidRootPart")

for _,Sound in pairs(RootPart:GetChildren()) do
	if Sound:IsA("Sound") then
		Sound:Destroy()
	end
end
13 Likes

It can be simpler just do this and put in startercharacter scripts:

local Character = script.Parent

local Humanoid = Character:WaitForChild("Humanoid")

Character.HumanoidRootPart.Running.Volume = 0
1 Like