Where would I start on a footstep material script?

Hello fellow developers!
I want to make a footstep script that changes sound on material and changes tempo on the players’ speed.

I don’t wanna ask to be spoonfed code but is there anywhere I could start?
Thanks!
-shkip_not

2 Likes

If you make an animation and use a Markers you can use this function to get when they step in the animation and then play the sound based on the material it touches.

There was a function for the last thing I mentioned but I forget it, trying to find it

2 Likes

You need to have a looped script constantly checking the “FloorMaterial” property (found in the players humanoid) and play a different sound depending on the material.

4 Likes

sorry for the late reply, but thank you. do let me know when you can find it. no rush :slight_smile:

1 Like

PeteMeCool stated it, the FloorMaterial of Humanoid.

2 Likes

Wow what a coincidence, I made a footstep material for my horror game last 4 days ago

You need to use the Humanoid.MoveTo to check if the player is moving then use the material to choose which sound of material to play

oh and wow, I didn’t notice that you typed in “tempo speed” and what a another coincidence, you can adjust the speed/ playperstep of the step sounds depending on what you want or depending on the player’s speed.

1 Like

Thanks! I will look into this later as I am working with another method. Again, thank you.

2 Likes

I agree with @MrLonely1221

using this function will probably be more optimized as well. (instead of using some sort of fast running loop)

you could probably even use Touched Events for players feet, but im not sure if its better.

1 Like