Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// Put this in the SoundService: https://www.roblox.com/library/3088104758/Footstep-Sounds
- --// Client
- local Character = script.Parent
- local Head = Character:WaitForChild("Head")
- local RunningSound = Head:WaitForChild("Running")
- local FootstepsSoundGroup = game:GetService("SoundService"):WaitForChild("Footsteps")
- local Humanoid = Character:WaitForChild("Humanoid")
- --// Sounds
- Humanoid.Changed:Connect(function(property)
- if property == "FloorMaterial" then
- RunningSound.SoundId = FootstepsSoundGroup:WaitForChild(Humanoid.FloorMaterial).SoundId
- RunningSound.PlaybackSpeed = FootstepsSoundGroup:WaitForChild(Humanoid.FloorMaterial).PlaybackSpeed
- RunningSound.Volume = FootstepsSoundGroup:WaitForChild(Humanoid.FloorMaterial).Volume
- if FootstepsSoundGroup:FindFirstChild(Humanoid.FloorMaterial) == nil then
- RunningSound.SoundId = FootstepsSoundGroup:WaitForChild("nil Sound").SoundId
- RunningSound.PlaybackSpeed = FootstepsSoundGroup:WaitForChild("nil Sound").PlaybackSpeed
- RunningSound.Volume = FootstepsSoundGroup:WaitForChild("nil Sound").Volume
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement