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

double tap with ContextActionService?

Asked by 3 years ago

im trying to make it so when the player double taps W it will make them run but as of currently im just stuck here not knowing how to script the rest

heres the code

local Service = game:GetService("ContextActionService")

Service:BindAction("Humanoid SpeedBoost", function(LeftShift, InputState, InputObject)
    if InputState == Enum.UserInputState.Begin then
        script.Parent.Humanoid.WalkSpeed = 32
        print("It Works")
    else
        script.Parent.Humanoid.WalkSpeed = 16
    end
end, false, Enum.KeyCode.W)

Answer this question