Update: nvm found the updated version of this script and it actually works

Heres the script (not mine i found it somewhere so i had to fix it because the running sound wasnt in head anymore):

while wait() do --Just a loop
local Humanoid = script.Parent.Parent:FindFirstChild("Humanoid") -- Find the players humanoid
local WalkSoundObject = script.Parent:FindFirstChild("Running") --The sound object in the players head
local carpet = "rbxassetid://133705377"

if Humanoid.FloorMaterial == Enum.Material.Fabric then
WalkSoundObject.SoundId = "rbxassetid://133705377" --Change the ID to the sound you want
WalkSoundObject.Pitch = 2 --Set this to the pitch you want the sound to play at
WalkSoundObject.Volume = .6 --Set this to the volume you want the sound to play at

elseif Humanoid.FloorMaterial == Enum.Material.Glass or Humanoid.FloorMaterial == Enum.Material.Foil then
WalkSoundObject.SoundId = "rbxassetid://215246646"
WalkSoundObject.Pitch = 0.85
WalkSoundObject.Volume = .1
end
end

I keep getting this message, any idea why?