After quite a few revisions I’ve finally finished my Custom walksounds script. It replicates the sounds to other clients as of this version.
Since this came with a noticeable delay on the client I decided to include a very similarly scripted client-side script so that no delay is noticeable on the client.
Lastly, I included a modulescript called “IDList” That holds all the audio ID’s and their properties, designed for maximum ease-of-use and minimum hassle.
TL;DR
Key features:
The attached IDList module script is easy to customize and configure.
The footsteps are replicated to all other clients.
No delay on the client side.
Max and min hearable distance is configurable.
Works for both materials AND terrain.
The default footstep sound has been muted for each client.
Instructions
Custom Walking Sounds:
Simply drag the script into Starterplayer > StarterCharacterScripts and thats it!
Remove Default Walking Sounds:
Simply drag the script into Starterplayer > StarterPlayerScripts and DO NOT RENAME IT!
End instructions
Hopefully it’ll assist you in the development of your amazing game(s)!
Demonstration video | Single player:
Demonstration video | Multiple players:
EDIT!! The server script should be redownloaded / replaced as of 11/8/23 because of an issue with humanoid:GetPropertyChangedSignal('FloorMaterial') in server scripts not working as expected.
EDIT 2 The script now uses a coroutine to create a new thread instead of spawn(function())
EDIT 3 The number of times a link was clicked resets everytime I edit my post, but we’re over 1.5k on the walksound script alone by now. Thank you all for your support!
EDIT 4 !Warning!
Some loser review botted the script. Please don’t pay any attention to the negative reviews left by bot accounts.
Yes this script works with all terrain and material (As of writing this comment atleast)
I put this in the description to make it clear to people that they are free to use / edit / modify this script. That’s pretty much the only reason. lol.
That’s correct, roblox doesn’t change the sound based on the terrain (atleast to my knowledge) but Enums do exist for each terrain type on roblox. Therefore I was able to script it!
Maybe it’s a bit late to reply but, this worked fine and all (I still had to change some stuff obviously to fit my own animation etc) but other than that the only issue i found is that you didn’t think of the possibility that when players change from A to D while moving the sound resets, ill fix my own thing but u might update this for next ppl that’ll use it
Hey, this post popped up as my first search for a custom open sourced walking sound, and after reviewing and using this source- there is a minor detail in this script which is caching that you should know.
Line 21, the server creates a new RemoteEvent every time a player spawns.
Fixed it with this.
-- Create remote instance
local updateWalkspeedRemote = game.ReplicatedStorage:FindFirstChild('UpdateWalkspeed')
if updateWalkspeedRemote == nil then
updateWalkspeedRemote = Instance.new("RemoteEvent", game.ReplicatedStorage)
updateWalkspeedRemote.Name = "UpdateWalkspeed"
end
I wanted to use this in my game, is there a way to add multiple sounds instead of only having 1 sound per texture? I tried to change it but it didn’t work. Idk how to script well.
This is really helpful since the scripts work really well and the sounds is really great too. I no longer need to make my own sounds or find some which is kinda laborious. Here’s some pics of the game I’m working. Anyways tysm. I’ll also add a credits in the credits section of my game.
Ye, I know it’s not required but I just have to since I know the scripts took time to make and the sounds too. You’re a lifesaver really, saved me so much time.