Actions bound to ButtonL2 are triggered by clicking on the main menu button

If you bind an action to Enum.KeyCode.ButtonL2 it will be triggered on PC if you click on the “Roblox menu” button in the top left corner of the screen.

Steps to reproduce:

  1. Add a script to StarterPlayerScripts with the following content:

     local ContextActionService 	= game:GetService("ContextActionService")
    
     ContextActionService:BindActionAtPriority(
     	"L2Test", 
     	function(actionName, inputState, inputObject)
     		print("L2 triggered")
     		return Enum.ContextActionResult.Sink		
     	end, 
     	false, 
     	Enum.ContextActionPriority.High.Value,
     	Enum.KeyCode.ButtonL2
     )
    
  2. Run the game and open the “Roblox main menu” by clicking on the button the top left corner

Expected results: “L2 triggered” should not be printed to the console

Actual results: “L2 triggered” is printed 4 times to the console

I have only tested this in Studio in multiple projects, not on Roblox.com.

l2bug

1 Like

Also did some further testing where I disconnected my Xbox controller and restarted studio, the same issue still occurs.

See:

3 Likes

I did miss the fact that it sent a “Cancel”.

This makes perfect sense, thank you.

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