How do I make User Input Service not work when I click on a button in the GUI? Because if I click the GUI button it will still take in Enum.UserInputType.MouseButton1.
There is no way to disable User Input entirely, as then you would not be able to do anything to the client. You can, however, make a variable that if you click a button your code is no longer ran.
local disabled = false local button = script.Parent button.MouseButton1Click:connect(function() if disabled then disabled = false elseif not disabled then disabled = true end end) game:GetService("UserInputService").InputBegan:connect(function() if not disabled then --code end end)