Hello, I'm making a turn-based game that should be compatible for controllers. I've ended up running into a small issue.
Although "ControlModule" works perfectly for keyboards, it doesn't really work well for controllers, as the player can still input using the control stick, which is the complete opposite of what I want. Furthermore, I tried making every KeyCode sink via ContextActionService. It works flawlessly with my keyboard, but again, my gamepad still prevails.
So, my question stands here. How do I disable player input for controllers and keyboards?
You could simply do this
local ContextActionService = game:GetService("ContextActionService") local FREEZE_ACTION = "freezeMovement" ContextActionService:BindAction( FREEZE_ACTION, function() return Enum.ContextActionResult.Sink end, false, unpack(Enum.PlayerActions:GetEnumItems()) )
and to unfreeze do this
ContextActionService:UnbindAction(FREEZE_ACTION)