What is the best way to disable movement for all types of input?

I’ve tried using both Enum.ContextActionResult.Sink (within a function bound to all PlayerActions) and requiring the PlayerModule and disabling controls that way. The issue with the first is that gamepad controls aren’t disabled at all, players are still able to move normally (movement with keyboard is successfully stopped). The issue with the second method is as @Daireb described in this post:

I also found that if you unfocus and refocus the Roblox window while using a gamepad with the second method, you regain control. Setting the character’s MoveSpeed to 0 isn’t a viable option for me (or at least, not an ideal one) because I’d like to still be able to use the MoveTo function on the player’s character. Would appreciate a reply if anyone’s found a nice way to deal with this issue.

"Setting the character’s MoveSpeed to 0 isn’t viable option for me (or at least, not an ideal one) because I’d like to still be able to use the MoveTo function on the player’s character

If no one else gives you a reply, you could still actually use MoveSpeed 0. Instead of using :MoveTo (which is not often used for player characters) you should use
[character].HumanoidRootPart.CFrame = Vector3.new(x,y,z)
(replace [character] with the players character)

1 Like

Thanks for the quick reply. In my case, I’m freezing player movement whenever the player engages in dialog with an NPC, or interacts with an object like a door. As far as the doors go, the idea is that the player will open the door by pressing a button, at which point they will lose control and the player’s character would walk into the building. The issue with simply setting the HRP’s CFrame is obviously that it simply teleports the player instead of having them walk to a location.

Im not overly familiar with this sort of area, so sorry if my reply is no good

Do you reckon it would be possible to use a BodyPosition to move them? Unfortunately I don’t think that it plays the animation, but it should be able to work regardless of the walk speed. Again, only do this if you cant find a better response

Just anchor the player is very easy

1 Like

Then duplicate the player model and use it