From what you described, it sounds like your action is being binded at a higher priority than the camera drag’s action. You can view binded actions by pressing F9 in game.
UserInputService should solve this problem, though you said it didn’t work. If the code didn’t work but the camera still did, you might have used the gameProcessed bool as a debounce on accident.
Try this code:
local remote --Set to RemoveEvent
UserInputService.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton2 then
print("Right Click!")
remote:FireServer()
end
end
Aside from answering your question, are you going to be changing the camera to lock to mouse movement without right clicking with this mechanic? I feel, from a player standpoint, that it would be annoying to have to right click for looking around and using a strong punch.
Add return Enum.ContextActionResult.Pass
At the end of the onClicked function, otherwise it won’t use right click for any other action (that’s why the camera doesn’t rotate)