I bound MB2 with CAS, and now I can't control my camera with it?

CAServ:BindAction("Right Punch", rightPunch, false, Enum.UserInputType.MouseButton2)

I no longer can move my camera by holding right click and moving my mouse.

I’ve been told why this happens - because Roblox’s inputs are also handled with CAS, and by binding my own thing I overwrite Roblox’s, or something like that - but I’ve never been told how to fix it?
So yeah, how can I fix this, and let them both work at once?

CAServ:BindAction("Right Punch", rightPunch, false, Enum.UserInputType.MouseButton2)
CAServ:UnbindAction("Right Punch")

Either use a different keybind for the action or only bind it when it is necessary to do so, unbind the action (as I have done above) at all other times.

1 Like

Ello, I believe I told you in the last past to return the Enum.ContextActionResult.Pass, this works from what I have tested in studio where you can still drag the mouse.

local CAS = game:GetService("ContextActionService")

local function rightPunch()
	return Enum.ContextActionResult.Pass
CAS:BindAction("Right Punch", rightPunch, false, Enum.UserInputType.MouseButton2)

However I believe this will cause other problems ex: Player tries to drag camera, but they punch instead so hopefully you have set up an alternative like a lock centered third person camera like most fighting games to avoid this control conflict like @Forummer said.