Making a custom footstep system

I’m trying to find out what’s the best way going around a footstep system.

I was thinking If I should only handle it on the server using while loops and arrays or client → server where I’d fire a remote on a Render Stepped.

Everybody in the game should be able to hear these footsteps.

1 Like

In a local script you need to get the character’s “Humanoid”, you can see what material the player’s character is walking on. In the “HumanoidRootPart” there is a Sound called “Walk” which you can change the sound ID according to the material they are on, this is an example of a script.

local Humanoid = script.Parent:FindFirstChild("Humanoid")
local Walk = script.Parent.HumanoidRootPart:FindFirstChild("Running")
while true do
	wait()

	if Humanoid then
		if Humanoid.FloorMaterial == Enum.Material.Grass then
			Walk.SoundId = "rbxassetid://252965149"
			Walk.PlaybackSpeed = 1.5
		end
		if Humanoid.FloorMaterial == Enum.Material.Concrete then
			Walk.SoundId = "rbxassetid://833564121"
			Walk.Volume = 2
		end
		if Humanoid.FloorMaterial == Enum.Material.Plastic then
			Walk.SoundId = "rbxassetid://833564121"
			Walk.Volume = 2
		end
	end
end

You can place the local script inside the Player’s Character.
image

1 Like

That won’t play for everybody + that’s very not effective for fps