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
If anyone knows a fix, plz help!