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://6535944474"
walk.Volume = 2
end
if Humanoid.FloorMaterial == Enum.Material.WoodPlanks then
walk.SoundId = "rbxassetid://8454543187"
walk.Volume = 2
end
end
end
So, after i’m doing this the song that i put in ID sounds doesnt works, how can i fix that?
What hes doing is, he has the walking sounds playing but the volumes are 0, when the player walks in a specific material, the script finds the material walking sound and sets the volume to 2 for it to be heard, but he is also changing the sound id which in changing the sound id, it would stop the sound. I am sure he wont need to change the sound id from the script since he can have all the sounds in the humanoidrootpart and have them named to their material walking sound. I think I might of not explained it well but im on mobile.
He can make a script that creates the walking sounds to the humanoidrootpart with volume 0. When the player walks on a specific material, the script looks for the walking sound of the material and sets the volume to 2.
Thats more of a good way for me to do a walking sound.
If not, it might be because he has the script changing the id while its playing.
So you wont be needing to change the sound id when you can disable the roblox walk sound and have the seperate walking sounds in the humanoidrootpart.
You are repeating this entire loop over and over. If you keep walking on one material you keep starting the same sound over and over which (I think) overlaps the sound over and over.
You also aren’t setting the sound Volume to 0 for any of the other sounds. Don’t know if the old sound keeps playing though.