I am trying to make my own footstep sound effects depending on the material you are currently standing on. I have created a folder inside SoundService called 'Footsteps' and put all my custom sounds with the same name as some of the materials does have inside. Then I created a local script inside StarterCharacterScripts:
local Character = script.Parent
local rootpart = Character:WaitForChild("HumanoidRootPart")
local RunningSound = rootpart:WaitForChild("Running")
local FootstepsSoundGroup = game:GetService("SoundService"):WaitForChild("Footsteps")
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid.Changed:Connect(function(property)
if property == "FloorMaterial" then
if FootstepsSoundGroup:FindFirstChild(Humanoid.FloorMaterial) == nil then
RunningSound.SoundId = FootstepsSoundGroup:WaitForChild("Plastic").SoundId
RunningSound.PlaybackSpeed = FootstepsSoundGroup:WaitForChild("Plastic").PlaybackSpeed
RunningSound.Volume = FootstepsSoundGroup:WaitForChild("Plastic").Volume
else
RunningSound.SoundId = FootstepsSoundGroup:WaitForChild(Humanoid.FloorMaterial).SoundId
RunningSound.PlaybackSpeed = FootstepsSoundGroup:WaitForChild(Humanoid.FloorMaterial).PlaybackSpeed
RunningSound.Volume = FootstepsSoundGroup:WaitForChild(Humanoid.FloorMaterial).Volume
end
end
end)
The problem is the custom soundeffect plays LOCALY only for the player who is currently walking, other players hear the default roblox plastic foosteps. Is there a way to make everyone hear the correct sound effect?

3 comments
I found this a bit too complicated, so what I did is that I've created my own footstep script and disabled the original in 'RbxCharacterSounds'
but this would take less then 5 lines ;-;
like remote:FireAllClients("ChangeStepSound", Player) remote.OnClientEvent:Connect(function(request, data) Player.Character.RootPart.Footsteps.SoundId = xxxxx end)