How can I add footstep noises (that are also heard by other players)

How can I add footstep noises that other players can hear? I’ve been having trouble with this, does anyone know a way to do this?

1 Like

Check if the humanoid is walking.
If it is, then play the sound.

game.Workspace.Player.Humanoid.Running:Connect(function(speed)
    if speed > 0 then
        print("Player is running")
        FootstepsSound:Play()
    else
        print("Player has stopped")
    end
end)
4 Likes

Change the footstep sound inside the HumanoidRootPart

1 Like

I’ve tried that before and the problem with that is that the footstep sound apparently doesnt exist on the server, and you can only change it with a local script (unless I did something wrong)

1 Like

Thank you! I had to fix a few things but I got it to work.

1 Like

How did you fix it? I’ve been trying to change this as well. The Sounds do not appear to exist When queried by server even tho you can see them in th server.

2 Likes

I actually made a new sound under Torso and had it play whenever the player was moving and wasn’t in the “Running” or “Landed” HumanoidStateType.

To make it play a different sound whenever you take a step, I made a table with all the different sounds, then made it detect whenever theres a change in the humanoid and change the floor material according to the Humanoid.FloorMaterial property. Example:

local materialTable = {
     [Enum.Material.Grass] = "rbxassetid://177940963";
     [Enum.Material.Brick] = "rbxassetid://277067660"
     -- etc.
}

humanoid.Changed:Connect(function()
	local floorMaterial = humanoid.FloorMaterial
	
	if materialTable[floorMaterial] then
		sound.SoundId = materialTable[floorMaterial]
	end
end)
2 Likes

I’ve also encountered this issue (seems like its not a commonly asked issue or at least not a common answer to it), Ill try to implement like this (please point out if its incorrect)

whenever a game match starts fetch all current players

local materialTable = {
     [Enum.Material.Grass] = "rbxassetid://177940963";
     [Enum.Material.Brick] = "rbxassetid://277067660"
     -- etc.
}

for i, v in pairs (game:GetService("Players"):GetPlayers()) do
local Character = game.Workspace[v.Name]
local Humanoid = Character.Humanoid
Humanoid:GetPropertyChangedSignal("FloorMaterial"):Connect(function()
	local FloorMaterial = humanoid.FloorMaterial
	
	if materialTable[floorMaterial] then
		sound.SoundId = materialTable[floorMaterial]
	end
end)
end

I don’t have time to test it out rn, ill also link my recent post (if this works this will be awesome!) although I don’t see why you not setting the sound ids in humanoid root part wouldn’t work out (considering you said you had to make a sound into torso)

Yea this seems to work very good–and now in the local I just go through all players including self, and make the necessary changes, although I didn’t need to make a new sound like you did, just change the current sounds in Humanoid Root Part. Thanks for the info.

1 Like