Disable gamepad input

Hi, I was having trouble figuring out a way to disable only gamepad input.
I found this DevForum post but I don’t fully know how to implement it: Disabling just gamepad input

Sink the inputs using ContextActionService.

game:GetService("ContextActionService"):BindActionAtPriority("SinkInputs", function()
	return Enum.ContextActionResult.Sink
end, false, Enum.ContextActionPriority.High.Value, unpack({
	Enum.KeyCode.ButtonL1,
	Enum.KeyCode.ButtonR1,
	Enum.KeyCode.ButtonL2,
	Enum.KeyCode.ButtonR2,
	Enum.KeyCode.ButtonL3,
	Enum.KeyCode.ButtonR3,
	Enum.KeyCode.ButtonX,
	Enum.KeyCode.ButtonA,
	Enum.KeyCode.ButtonY,
	Enum.KeyCode.Thumbstick1,
	Enum.KeyCode.Thumbstick2
}))
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.