Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

does anyone know how to make material based footsteps sounds?

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)

2 comments

0

Are you referring to the way footsteps sound depending on the material surface being walked on?

0

i think

1 answer

✓ Accepted answer

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!

This discussion is preserved as it was. New answers, comments, and votes are closed.