For example: If a cut scene happens, I want the players keyboard to disable when it happens and when the cut scene is over, the keyboard is back working.
Now there are 2 ways to do this. I will list them both. One, very simple. And the other fairly complex.
Now. This is a fairly simple way, isn't it? Yes. it is. no gimmicks, no jokes. All you have to do is make the player's walkspeed 0. But there are some cons to this which may make you want to consider the other choice.
Cons: The player can jump, Any other script which edits the player's walkspeed can edit this.
Ok, so there is a script inside the Player called ControlScript. This script is basically how player's controls their character. If disabled or removed, the player loses all control.
But how do we do it?
local control = player:findFirstChild("ControlScript", true) -- set the bool recursive to true so it looks through all of its children control.Disabled = true
This will disable the control script, rendering the player's ability to move useless. But remember, you have to make Disabled false after the cutscene is done, or the player will be stuck there, forever.