ButtonR3 in Gamepad Console does not work (On Emulator))

I am using a custom camera system and I don’t know why everytime I press ButtonR3 with my emulator gamepad controller, it does not fire. Is there’s any alternative ways to fix this?

I already know that Button R3 does like first person toggle.

UserInputService.InputBegan:Connect(function(input, gameProcessed)
	if gameProcessed then return end

	if input.KeyCode == Enum.KeyCode.V or input.KeyCode == Enum.KeyCode.ButtonR3 then
		inThirdPerson = not inThirdPerson
	end
end)

Fixed it myself, I used local ContextActionService = game:GetService("ContextActionService"), and added ContextActionService:BindActionAtPriority to override the Roblox keybinds.

Now it works perfectly!

local inThirdPerson = false

-- Keybind toggle
local ContextActionService = game:GetService("ContextActionService")

local function toggleCamera(_, state)
	if state ~= Enum.UserInputState.Begin then return end
	inThirdPerson = not inThirdPerson
end

ContextActionService:UnbindAction("ToggleCameraMode")
ContextActionService:BindActionAtPriority("ToggleCameraMode", toggleCamera, false, 2000, Enum.KeyCode.V, Enum.KeyCode.ButtonR3)
2 Likes

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