Hello, I have a default audio for walking, and I need help with a script that changes the audio playback speed when left shift is pressed. Sorry if the script is kinda messy, still learning
local UIS = game:GetService("UserInputService")
local KeyCode = Enum.KeyCode.LeftShift
UIS.InputBegan:Connect(function(input, event)
if input.KeyCode == KeyCode then
local player = game.Players.LocalPlayer
local sound = player.HumanoidRootPart:Waitforchild("Running")--audio i need to change
sound.PlaybackSpeed = "2"
end
end)
I tried my best, what can I do to fix this?

2 comments
http://idownvotedbecau.se/noexceptiondetails - refer to this link to see why this question may not be well-received.
At line 8 you should put [...] = 2 and not [...] = "2"