Optimized and Improved Character Sound script



If you're using the default character sound script, I've written a network traffic-optimized version.

File attached:
Sound.rbxmx (11.0 KB)


Testing place:

(To use, place the "Sound" script within "StarterPlayer/StarterCharacterScripts")

This problem came from @alexnewtron's 100-player meepcity servers, they were having network bandwidth problems with the "new sound code" enabled.

The old default sound code sent a bunch of unnecessary replication traffic. This new code, in the "worst case scenario" (a player repeatedly jumping up an upwards slope) should be up to 6x less network traffic, while behaving almost exactly the same to to player.

Anyway, try it out and let me know if you've got any comments.
This will be the new default within a few weeks.


Sweet! I am looking forward to any optmizations that benefit 100 player servers.


its live as the default


One small thing I gotta poke at real quick.
The old version of the sound script used to scale the pitch based on the user's movement speed, but this doesn't appear to be the case anymore.


this is actually intentional.
it causes a lot of unnecessary (if you consider this feature unnecessary) network traffic when not filtering enabled.
its normally not very noticeable too, and just sounds "strange" when moving up slopes.


Does this code only effect the characters humanoid? What about sounds in workspace or something.


It only affects character sounds. Characters come with a sound script (unless overwritten in StarterCharacterScripts) that handles the sounds for walking, falling, swimming, dying, etc. Any sounds not handled by that script are unaffected.


Update: I've got some minor changes I'd like to make to the humanoid sound scripts.

  1. I'd like to split the "footsteps" sound into the actual individual steps. This would be the "correct" fix to the humanoid walkspeed sound problem.

  2. I'd like to fix the swimming sound to loop better. There's a noticeable gap in it.

If anyone's already solved these problems and would like to contribute your work please let me know :slight_smile:


"I'd like to split the "footsteps" sound into the actual individual steps."

It'd waaay cool if in the future this was taken advantage of to change footstep sounds to reflect the material being walked on


I'd also like to try a few experimental things once "Audio Effects" are out (which will be soon? pending some design decisions).

Again, if you've got anything you'd like to contribute (because I know a bunch of games implement this themselves) we could make this dream a reality :slight_smile:


I have a bunch of footstep sounds Ive recorded for my game. I modeled my footstep sound script after roblox's so everything is in a 1 sec loop, however I still have the original files.

Do you have an email address? I can send you my audio.


If you separate the footstep sounds, please also remove that awful one with the creaking noise.


Something I noticed is that the script won't work as intended (without modification) if the Humanoid is renamed.

Here is an idea to make it more universal:

while not Humanoid do
	for _,NewHumanoid in pairs(Figure:GetChildren()) do
		if NewHumanoid:IsA("Humanoid") then
			Humanoid = NewHumanoid


Or make it get used when stepping on woodplanks?




great, ill make that change


Once Instance::FindFirstChildOfClass() is enabled in a few weeks that can be simplified to:

local Humanoid = Figure:FindFirstChildOfClass("Humanoid")
while not Humanoid do
	Humanoid = Figure:FindFirstChildOfClass("Humanoid")


Fixed some spelling/grammar mistakes and removing v1/v2 sound mode check as well.


Yay! No more creating GetHumanoid functions!