Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

does anyone know how to make material based footsteps sounds?

Asked by 3 years ago

i want to make a few games with that but i cant find any that work (and my last thing here was unclear so i made a new one)

0
Are you referring to the way footsteps sound depending on the material surface being walked on? ElectricZooo 55 — 3y
0
i think steel_apples 58 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

The humanoid of the Player's Character has a unique property called FloorMaterial. Wherever you're standing on, it will detect the material of it.

Example: if you step on a wooden part, the FloorMaterial property changes to WoodenPlanks/Wood!

You could use it like this:

player = game.Players.LocalPlayer
char = player.Character or player.CharacterAdded:Wait()

--imagine it's a tool, you want it to print whatever material you're on

script.Parent.Activated:Connect(function()
    print(char.Humanoid.FloorMaterial) -- prints the material of floor
end)

You can do if statements to produce different noises on different floors with this property!

Ad

Answer this question