Changing running sound on client not replicating to other clients

Hi, I’m attempting to change the running sound’s SoundId in a Footsteps script, but whilst this is successful for the client who changed it, other clients still do not hear the changed sound, and rather the default running sound.

The sound is being set in a SetSound function:

function Footsteps.SetFloorSound(Character)
	local Humanoid: Humanoid = Character.Humanoid
	local HumanoidRootPart: BasePart = Character.HumanoidRootPart

	if not Humanoid then
		return
	end

	if not HumanoidRootPart or (HumanoidRootPart and not HumanoidRootPart:FindFirstChild("Running")) then
		return
	end

	if Humanoid.FloorMaterial == Enum.Material.Air then
		return
	end

	local Sound: Sound = FootstepsFolder[Humanoid.FloorMaterial.Name]
	if Sound then
		HumanoidRootPart.Running.SoundId = Sound.SoundId
		HumanoidRootPart.Running.PlaybackSpeed = Humanoid.WalkSpeed / 17
	end
end

This is being executed on when the FloorMaterial changes, and once at the start of every session. This is done on the client.

Appreciate any help

Any changes made on the client does not replicate to the server. So either change that to server sided script or make a RemoteEvent that tells the server to change the sound the sound. There’s probably a few more other solutions but I’d stick with the 1st one since well, it likely the best option since using the 2nd option allows for exploiters to mess with it I guess.

SoundId is replicated; there exists no “Running” on the server under the HumanoidRootPart.

Bro wake up filtering enable is gone :scream:
Jokes asside
Title of post says about itself
For server/client (and opposite) communication you need RemoteEvent | Documentation - Roblox Creator Hub or RemoteFunction | Documentation - Roblox Creator Hub
Althrough dont use remote function for server-client or else you will have to handle thread management manually via coroutines for safety

I don’t know what you’re saying

SoundId is replicated; there exists no “Running” on the server under the HumanoidRootPart.

changing property SoundId will not replicate to other clients
It will only change to other clients if this is done on server

1 Like

Set SoundService.RespectFilteringEnabled to false if you want sounds played on the client to replicate to other clients.

This, of course, comes with obvious issues, so you could just use a RemoteEvent instead if you care about security.

2 Likes

that a safety consern however.
Exploiters could be able to play sounds that will get your game taken down :skull:

Well you could check the AssemblyLinearVelocity.Magnitude of the humanoidrootpart and check if it’s higher than 1 and there’s also a function to check if the humanoid is running: Humanoid.Running:Connect() not sure why you aren’t using that but I won’t ask. You also explicitly state

And now you’re saying it is replicated someway?
I’ll just say this again making changes on the client will not affect the server.

The Roblox’s “Running” sound does not exist on the server. By changing it via a LocalScript (like Roblox’s RbxCharacterSounds) the intended functionality is it will change it for all other clients- I cannot use a RemoteEvent because the server cannot interact with the Running sound for it doesn’t exist on the Server.

no
You need to use remote event to tell other clients to do that
Client->Server->Other clients

1 Like

client fires remote
server receives remote and fires remote to all other clients
clients receive remove and change soundid accordingly
?

1 Like

Roblox provides the option; this will not get your game taken down.

:ear: :drop_of_blood: AAAAAAA PLEASE STOP PLEASE 999DB sounds my ears.
It definatly will as since this property is disabled for a reason

If you’re only changing this for the LocalPlayer it won’t replicate. You have to change it for all other players and new players that join on the client as well.

Please review this post regarding the functionality of Roblox’s footsteps & character sound system.

Character sounds are managed by a LocalScript- I have programmed this before and they change appropriately to other clients when changed by a LocalScript. My issue here is this is not happening; please stop advising I use RemoteEvents.

Oh makes more sense

Well why not create a sound within the Character on the Server instead of just using the one made by Roblox?

Bro what you are talking about?


Sounds do exist on other characters locally
I already told you the solution

I appreciate you trying to help but I’m looking for someone who has did this kind of thing before. Using your recommended solution is not the correct solution to this problem.

In theory I am sure this works; but it is a workaround to the bigger problem I have.