Randomized Footsteps

I’ve been left to script a apparently “trivial thing to do” by my friends, but I’m pretty stuck at the moment. (I’m really bad/new to scripting, I mostly build things)

My aim is to make an effect of when you walk over a material (plastic for example), it plays audio, but two different ones one after the other.

I’ve been following a few guides non which suit to my exact need, browsing models etc. I found this one to be pretty good, it’s easy to use but, I don’t know how to link more than 1 audio tracks to this.

For example at the start of the modulescript the actual script sources its audio tracks it does:

local IDList = {
	Metal = {id = "rbxassetid://329997777", volume = 0, speed = 1.00},
}

Is the script inheritently doomed by nature and I should just make a randomized sound and upload it to the marketplace, or can I attach multiple tracks to a single materials with this “IDList” method?

Obviously I’m still working on it but some insight would be appreciated as I am fairly new to this.

Hey! This may help you out!

local IDList = {
     Metal = {sound1 = {id = "ID", volume = 0, speed = 1.00}}, sound2 = {id = "ID", volume = 0, speed = 1.00}}
}

local sound1Volume = IDList[Metal][sound1][volume]

This does look messy, but it is the most simple way to do it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.