Help with dictionaries/lists?

I’m trying to make a material footstep script that changes an audios id, volume, playbackspeed by using a dictionary that holds values based on a material the humanoid is on

In the dictionary I’m trying to make it so multiple materials can hold the same values but I’m not sure how to do this. I’ve tried to use something like this but I’m not sure if this is how you would do it. Any help with this would be greatly appreciated:

image

You wrote an evaluation with the or operator. Or will return the first operand that’s truthy and that happens to be Concrete, so Concrete is the indice of the table. Can’t write your indices this way; you have to set a new index in the table.

[Enum.Material.Concrete or Enum.Material.Cobblestone]
-> Evaluates expression first and uses result as the key
-> Enum.Material.Concrete is truthy (not false or nil), so or picks this operand
-> Enum.Material.Cobblestone is discarded
1 Like

ohhh alright, thanks for clearing this up for me i didnt know this