I’m trying to bind a function to the W key, which is of course bound to the normal forward movement, so whenever BindAction
is ran, it overwrites the default movement making me unable to move. I still haven’t been able to fix it and I don’t know what’s causing it, I’m returning Enum.ContextActionResult.Pass
which should allow other functions bound to the W key run, but it still won’t let me walk.
[Enum.KeyCode.W] = function()
if os.clock() - wPressed <= DOUBLE_CLICK then
if state:Input("Running") then
contextActionService:BindAction("StopRunning", function(actionName, inputState)
if inputState == Enum.UserInputState.End and state:Input("Idling") then
contextActionService:UnbindAction(actionName)
end
return Enum.ContextActionResult.Pass
end, false, Enum.KeyCode.W)
end
end
wPressed = os.clock()
end