The first function does not seem to work. The problem with the second one is that the character moves the direction you were heading after it’s enabled again. So the character would move that direction when enabled until another userinput was fired like pressing w again.
You can also change their player’s movement mode from UserChoice to Scriptable. On wiki as DevComputerMovementMode and DevTouchMovementMode. This might be slightly more useful because it can be set from the server as well and it makes sense since it is Scriptable.
These solutions will work, but I thought I’d add an easy way to do this if you’re using the default ControlScript. First you’ll want to copy the default ControlScript from a player and put it into PlayerScripts. It contains the MasterControl ModuleScript, which you can require to access some functions for controlling input to the character.
local player = game.Players.LocalPlayer
local masterControl = require(player.PlayerScripts:WaitForChild("ControlScript"):WaitForChild("MasterControl"))
How would I also disable mouse input? Been trying to set up an animated cutscene thing but I can’t get it to work properly without disabling the player’s mouse input so they can’t move the camera while the cutscene (animation) is playing
Maybe set the camera to “Fixed” or “Scriptable”?
If it NEEDS the Humanoid’s “Custom” camera type, maybe you should rewrite the cutscene system you use to fit the types mentioned.
In Fixed, the mouse works, but the camera is immovable.
In Scriptable, the mouse also works, but the camera is immovable to all except Scripts.