Disabling and enabling movement, while taking into account current controls being held

I am currently doing

local PlayerControls = require(Player.PlayerScripts:WaitForChild("PlayerModule")):GetControls()

PlayerControls:Enable(active)

However, when I re-enable it, while I am still holding down WASD, my character doesn’t move. This, to me, is terrible UX design, and will make combat in my game incredibly frustrating. I want to be able to stop the player from moving, but when it is enabled again, if they are holding down movement keys, they should continue to move.

Quick video, shows that when I do a combo with my sword, I disable movement. But when it stops, my character is now stuck (this is because I am still holding WASD keys)
ezgif.com-gif-maker (24)

For me to move, I have to let go, and press them again. I DON’T want this

1 Like

try setting the Humanoid.WalkSpeed to 0
and Humanoid.JumpPower to 0
if you do it right the player cant move

1 Like