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?
What i do is replicate the local sound to all clients with a remotem using :FireAllClients(), and remember to turn down the default step sound on charadded.