The issue I’m facing is that when the player jumps (unbinding said actions), if they were pressing any of the key before jumping, the character will not begin to walk.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
You could override the normal movement inputs, retrieve the player’s input values with the ControlModule, then input those values into Humanoid:Move()
Additionally if you don’t want to worry about having the normal WASD keys being unbound, you could use UserInputService’s InputBegan/Ended events to send inputs to whatever handles your climbing system
local RunService = game:GetService("RunService")
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:FindFirstChild("Humanoid") or Character:WaitForChild("Humanoid")
local ControlScript = require(Player:WaitForChild("PlayerScripts").PlayerModule:WaitForChild("ControlModule"))
RunService:BindToRenderStep("OverrideMovement", Enum.RenderPriority.Character.Value + 1, function()
local MoveVector: Vector3 = ControlScript:GetMoveVector()
Humanoid:Move(MoveVector, true)
end)
Hey, thanks for the reply!
UserInputService is a bit of a hassle for me because I have to be able to bind and unbind these actions from a lot of different scripts, if everything fails though, I’ll have to use it.
Will try and see what the solution is. Thanks! And hats off for having the guts to write vertically aligned code
Well, my solution was a bit different, but it used some of this code so I’ll mark the solution.
Firstly I use override the default movement like you wrote:
I basically unbind the “Override Movement” when the player is climbing, and then just before they stop climbing I rebind it.
And I’m no longer using ContextAction Service, as whenever I did use it to prevent the player from moving, even if I disabled lateral or backwards movement, it paused forward movement as well.
So now I’m detecting input for the climbing system with UserInput Service.