Controls:disable () (or controls:enable (false)) only disable the currently active controller! Here’s an example of using it: This means if a player switches from keyboard to gamepad, or between any two.
Used to enable and disable touch controls and touch control display ui. I have experienced issues with disabling controls via the playermodule, the function disable needs to be called around 2 times because it just doesn’t disable the controls. How to disable player controls (roblox scripting tutorial) danido6809 190 subscribers subscribe
However, this seems to only disable keyboard controls. To disable controls, you have to access the player module that’s in the player scripts. In this lesson we cover replicatedstorage, module, userinputservice, startercharacterscripts, playergui, textlabel and screengui, removeevents, fireserver, onserverevent etc.more. It has a get controls function that returns the controls class.