For example player touched a part, which cause him activate GUI. While GUI is active, WASD and Space must not work. So, im not sure, what function from UserInputService i supposed to use for that.
Just change the players jump power and the walkspeed
local player = game.Player.LocalPlayer local humanoid = player:WaitForChild('Character').Humanoid humanoid.WalkSpeed = 0 humanoid.JumpPower = 0
and the default walkspeed is 16 and the default jump power is 50 just check if the frame is visible to disable walking
If someone has the same question, there is a way to disable controls:
--// Require Controls in LocalScript local controls = require(game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule):GetControls() --// Disabling Controls controls:Disable() --// Enabling Controls controls:Enable()