Having custom footstep & death sounds play for all clients? Along with specific pitches, volume etc

There doesn’t seem to be much help regarding how to get custom sounds for footsteps and etc. to be replicated to not just self but for everyone in the game.

Currently When I die I hear the custom death sound but on a seperate client it just hears oof. Same goes for stepping on specific material.

I tried to set up this:

--on death event in server
            local PlayerName = player.Name
			for i, v in pairs (Players:GetPlayers()) do
				print(v.Name)
				print(v)
				print(player.Name)
				
				if player.Name~=v.Name then
					PlayerSounds:FireClient(v, PlayerName, "Death")
				end
			end

but whenever I sent the info, PlayerName (target for which sound need to play the custom sound), was nil :man_shrugging:

I was hoping to get the game.workspace[playername].character, then go into humanoid root part and play the death sound (I would also have to apply pitch volume id etc if applicable)

I’ve looked at other posts too but they don’t really solve the issue

EDIT: May have found a solution, going to sleep rn but if you’d like to check:

1 Like

Can’t you just modify the default RbxCharacterSounds script and put it in StarterPlayerScripts and it’ll be the same across all clients?

1 Like
[Enum.HumanoidStateType.Running] = function()
			stopPlayingLoopedSounds(sounds.Running)
			sounds.Running.Playing = true
			playingLoopedSounds[sounds.Running] = true
		end

I would need to add a detection for stepping on materials and change the id pitches as I had done in starterplayercharacter scripts, assuming that it would function in this case. Ill pick up on it tomorrow.

It should, because this change will affect all users and require no remote events, just changes the default sound effect. I don’t see any reason you couldn’t do material checking as well. Good luck, let me know if it works tomorrow!

1 Like

I have this script from an old project, it works perfectly for me, I hope it works for you.
(this script changes the action sounds for all players from the client)

Put this LocalScript in [StarterPlayer > StarterCharacterScripts]:

local Players = game.Players

function ActionSounds(obj)
    local player = Players:GetPlayerFromCharacter(obj)
    if not player then return end
    local HRP = obj:WaitForChild("HumanoidRootPart")
    HRP.Climbing.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3" --your ID sound
    HRP.Died.SoundId = "rbxasset://sounds/uuhhh.mp3" --your ID sound
    HRP.FreeFalling.SoundId = "rbxasset://sounds/action_falling.mp3" --your ID sound
    HRP.GettingUp.SoundId = "rbxasset://sounds/action_get_up.mp3" --your ID sound
    HRP.Jumping.SoundId = "rbxasset://sounds/action_jump.mp3" --your ID sound
    HRP.Landing.SoundId = "rbxasset://sounds/action_jump_land.mp3" --your ID sound
    HRP.Running.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3" --your ID sound
    HRP.Splash.SoundId = "rbxasset://sounds/impact_water.mp3" --your ID sound
    HRP.Swimming.SoundId = "rbxasset://sounds/action_swim.mp3" --your ID sound
end

workspace.ChildAdded:Connect(function(obj)
    ActionSounds(obj)
end)

wait(2)

for i, obj in pairs (workspace:GetChildren()) do
    ActionSounds(obj)
end
2 Likes

It didn’t work for some reason (it only affected self client), but I did find and successfully execute a solution here, thanks for trying though:

@VEGAVEGA99 is similar in fashion but I like mine better. Either mine or vega’s will work if anyone sees this

2 Likes

That’s weird. In my test it was working for all clients. Glad to hear you found a solution though.

2 Likes