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

If Walkspeed Then Sound Volume not working?

Asked by 4 years ago
Edited 4 years ago

So I am making a script that sets a certain sound's volume to 0 when a player goes faster than 20 or his ws equals to 20...

wait(2)
if game.Workspace.PlayerName.Humanoid.WalkSpeed >= 20 then
game.Workspace.Sound.Volume = 0
elseif game.Workspace.PlayerName.Humanoid.WalkSpeed <= 19 then
game.Workspace.Sound.Volume = 1
end

This simple script isn't working, I first tried to use it with a admin loadstring and then tried on Studio, but it's still not working.

Answer this question