How do I fix my custom footstep sounds from being sped up and high pitched?

Recently, I just added a custom script to my game that adds custom sound effects to when the player walks on a certain material. But for some reason, it is sped up and high pitched.

Here’s how it’s supposed to sound (looped)

And here’s how it sounds in game (The sound may be a bit quiet)

As you can tell it’s sped up and high pitched. Does anyone know a way to fix this by either a script or something?

Also here’s the code for the custom footstep sounds:

local MaterialSounds = 
	{
		[Enum.Material.Grass] = "rbxassetid://507863105",
		[Enum.Material.Metal] = "rbxassetid://944089664",
		[Enum.Material.DiamondPlate] = "rbxassetid://944089664",
		[Enum.Material.Pebble] = "rbxassetid://944090255",
		[Enum.Material.Wood] = "rbxassetid://118963081526014",
		[Enum.Material.WoodPlanks] = "rbxassetid://944075408",
		[Enum.Material.Plastic] = "rbxassetid://944075408",
		[Enum.Material.SmoothPlastic] = "rbxassetid://944075408",
		[Enum.Material.Sand] = "rbxassetid://944090255",
		[Enum.Material.Brick] = "rbxassetid://4981969796",
		[Enum.Material.Cobblestone] = "rbxassetid://4981969796",
		[Enum.Material.Concrete] = "rbxassetid://78958298131160",
		[Enum.Material.CorrodedMetal] = "rbxassetid://4981969796",
		[Enum.Material.Fabric] = "rbxassetid://4981969796",
		[Enum.Material.Foil] = "rbxassetid://4981969796",
		[Enum.Material.ForceField] = "rbxassetid://4981969796",
		[Enum.Material.Glass] = "rbxassetid://944075408",
		[Enum.Material.Granite] = "rbxassetid://944075408",
		[Enum.Material.Ice] = "rbxassetid://4981969796",
		[Enum.Material.Marble] = "rbxassetid://944075408",
		[Enum.Material.Neon] = "rbxassetid://4981969796",
		[Enum.Material.Slate] = "rbxassetid://944075408",
	}

local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local FootStepsSound = HumanoidRootPart:WaitForChild("Running")

Humanoid:GetPropertyChangedSignal("FloorMaterial"):Connect(function()
	local FloorMaterial = Humanoid.FloorMaterial
	local Sound = MaterialSounds[FloorMaterial]
	if Sound then
		FootStepsSound.SoundId = Sound
	else
		FootStepsSound.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
	end
end)

(This script is put in StarterCharacterScripts if anyone’s wondering)

Also the example I’m using is the Concrete sound effect
Screenshot

If anyone knows a fix, plz help!

The ‘Running’ sound instance weirdly enough comes with a standard PlayBackSpeed of 1.85.

image

I replicated this scenario you’re having by adding a sound to the Workspace and playing it with a PlayBackSpeed of 1.85, and with looping enabled it sounds the same.
Therefore I imagine changing the sound’s PlayBackSpeed to 1 before you play/change the SoundId should return the sounds going back to normal.

3 Likes

Yeah, I just noticed that I needed to copy the local script called RbxCharacterSounds from StarterPlayerScripts and then change the pitch for ‘running’ to 1 and now it works, thanks! :+1:

1 Like

Please note my reply as ‘solution’ so the Forums can finalize this thread.

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