(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.
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.
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.
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.
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
break
end
end
wait()
end
Once Instance::FindFirstChildOfClass() is enabled in a few weeks that can be simplified to:
local Humanoid = Figure:FindFirstChildOfClass("Humanoid")
while not Humanoid do
Figure.ChildAdded:wait()
Humanoid = Figure:FindFirstChildOfClass("Humanoid")
end