#Custom walking sounds

1 messages · Page 1 of 1 (latest)

formal haven
#

this is the script i use created by chatgpt to remove default walking sound and add custom now the problem isnt custom sounds they all work the problem is default walking sound wont remove itself no matter what.help

#

local RunService = game:GetService("RunService")
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local rootPart = character:WaitForChild("HumanoidRootPart")
local sandSoundId = "rbxassetid://336575096"
local defaultSoundId = "rbxassetid://5446226292"
local runSound = Instance.new("Sound")
runSound.Name = "CustomRunningSound"
runSound.Volume = 1
runSound.Looped = true
runSound.SoundId = defaultSoundId
runSound.Parent = humanoid
RunService.Heartbeat:Connect(function()
for _, child in pairs(humanoid:GetChildren()) do
if child:IsA("Sound") and child.Name == "Running" and child ~= runSound then
child:Destroy()
end
end
end)

local function updateSound()
local rayOrigin = rootPart.Position
local rayDirection = Vector3.new(0, -5, 0)

local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {character}
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist

local result = workspace:Raycast(rayOrigin, rayDirection, raycastParams)

if result and result.Instance and result.Instance.Name == "SandBlock" then
    if runSound.SoundId ~= sandSoundId then
        runSound.SoundId = sandSoundId
        if humanoid.MoveDirection.Magnitude > 0 then
            runSound:Play()
        end
    end
else
    if runSound.SoundId ~= defaultSoundId then
        runSound.SoundId = defaultSoundId
        if humanoid.MoveDirection.Magnitude > 0 then
            runSound:Play()
        end
    end
end

end

RunService.Heartbeat:Connect(function()
updateSound()
end)

humanoid.Running:Connect(function(speed)
if speed > 0 then
if not runSound.IsPlaying then
runSound:Play()
end
else
runSound:Pause()
end
end)

#

DEFAULT WALKING SOUND KEEPS COMING BACK EVERY TIME

mystic veldt
#

where did u put this script

#

?

formal haven
#

starter characterscripts?

#

the custom footsteps work the default is problem

mystic veldt
#

maybe do rootPart.Running.Volume = 0

#

like above the for loop

formal haven
#

do i just add it to my script

sage houndBOT
#

studio** You are now Level 1! **studio

mystic veldt
formal haven
#

still hear

#

it

#

you want to see how it sounds?

mystic veldt
#

yes

formal haven
#

did you see the message

mystic veldt
#

uh no

formal haven
#

why video file

#

idk

mystic veldt
#

@formal haven

#

yo

formal haven
#

@formal haven

#

me

mystic veldt
#

run the game

#

in studio

formal haven
#

same problem

mystic veldt
#

no run the game in studio

#

after that

#

go to your player scripts

formal haven
#

k

mystic veldt
#

copy this script

#

then paste it to starterplayerscripts

sage houndBOT
#

studio** You are now Level 1! **studio

formal haven
#

copied

#

ah

#

ok

#

done

#

what next

mystic veldt
#

okay so

#

now go inside the rbxcharactersounds script

#

wait just so i know you're not running the game right

formal haven
#

and search for running?

#

yes

#

im not

mystic veldt
#

okay

formal haven
#

Running = {
SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
Looped = true,
Pitch = 1.85,
},

#

?

mystic veldt
#

yes

#

replace that sound id

formal haven
#

ahh

#

cool idea

mystic veldt
#

to your running sound id

formal haven
#

wait

#

but then if i go over sand

#

it will be the custom sound 1#

#

i have 2 custom sounds

#

one over sand other over everything else

#

can i just mute it somehow

#

or make it really quiet

mystic veldt
#

dw

formal haven
#

ok

#

its changed

#

now run?

mystic veldt
#

yes

#

did it work

formal haven
#

you fiksed it but now there is a sound of the custom walking sound every time i walk over everything

#

maybe i should just change the audio id to something like no audio

#

i should find like nothingness

formal haven
#

wait

mystic veldt
#

can u publish it

#

and let me join the game

formal haven
#

yes

#

join

#

but i know the fix probably

mystic veldt
#

@formal haven ok now

#

you make the sand check there

#

no need to do runservice heartbeat btw

formal haven
#

yes

mystic veldt
#

i gotta go

formal haven
#

i understand now

#

ok

mystic veldt
#

so just dm me if there are any bugs

formal haven
#

thank you

#

anywas

#

very mucj