So, I have this script:
local char = script.Parent
delay (0, function()
while wait()do
if char.Humanoid.FloorMaterial == Enum.Material.Concrete then
char.HumanoidRootPart.Running.SoundId = "rbxassetid://2991635108"
char.HumanoidRootPart.Running.Volume = 0.1
char.HumanoidRootPart.Running.PlaybackSpeed = 0.95
elseif char.Humanoid.FloorMaterial == Enum.Material.Wood then
char.HumanoidRootPart.Running.SoundId = "rbxassetid://336401972"
char.HumanoidRootPart.Running.Volume = 0.5
char.HumanoidRootPart.Running.PlaybackSpeed = 0.85
end
end
end)
I would like to know if there was a way that i could make the playbackspeed of the sound increase/decrease based on what the players walkspeed is. For example, if the players walkspeed is 16, then the playbackspeed would be 1; or something like that. ive tried to make an if statement that checks what the players walkspeed is, but that came to no avail. Help would be appreciated
Thanks

2 comments
my answer seems to have disappeard...
Maybe you could make a while true do loop, take walk speed, divide it by a constant number, set it as your playback speed, wait(.1)?