Hello fellow developers,
I'm working for a cutscene and so I have to disable player controls through PlayerModule. I don't use walkspeed & jump height method because I am also moving the humanoid to another position, setting walkspeed to 0 will ruin it.
My problem: Sometimes the controls are disabled, sometimes not and I'm looking to fix that.
This is the code:
local PlayerModule = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")) local Controls = PlayerModule:GetControls() Controls:Disable()
This is the error I'm getting:
Player:Move called, but player currently has no humanoid.
Any help is appreciated, thank you.
Although I have no experience with PlayerModule, I think that the problem is happening because the player is moving while the script is executing, and it seems to be interfering with your code. Try perhaps anchoring the Player's HumanoidRootPart before halting all of the player's movement, and unanchoring the HumanoidRootPart when the cutscene is finished.