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

How could I make random walk noises play on a certain material?

Asked by 5 years ago

I want to give my game a Half Life 2 Vibe by using there walking noises. I have them all but they use a sequence of sounds playing at random. I tried doing it with math.random but it didn't work because the roblox sound is oddly formatted out. Anyone know how to does this and have done this before?

0
Change some of the stuff in the script to make it work. You should use Enum.Material and part.Touched. Write this inside your script: local Sound = game.Workspace.SoundName local Part = script.Parent Part.Touched:Connect(function(Hit) if Hit:FindFirstChild('Humanoid') then if Part.Material == Enum.Material.MaterialType then Sound.Playing = true wait(1) Sound.Playing = false end end end) DEVLogos 8 — 5y
0
Thanks I'm gonna use this type of script instead of editing the original sound script. DogCooper 2 — 5y
0
You can make use of the FloorMaterial property of a Humanoid. Rheines 661 — 5y
0
You could rename the materials and have a script that test for a player and makes a sound once a player is detected Darksniper600 104 — 5y

Answer this question