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

Is there a way to play a certain soundId at a certain walkspeed?

Asked by 2 years ago

Hi, I was wondering if there's a way to play a custom soundid when walking at a certain speed?

1 answer

Log in to vote
0
Answered by 2 years ago

Try:

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(c)
        local sound = Instance.new('Sound')
        sound.Parent = c
        c.Humanoid:GetPropertyChangedSignal('WalkSpeed'):Connect(function()
            if c.Humanoid.WalkSpeed == certain number here then
                sound.SoundId = SoundId here
                sound:Play()
            end
        end)
    end)

end)

Every time the walkspeed changes it will check if the value is a certain number.

Ad

Answer this question