#✅ | Right-Clickable Button
1 messages · Page 1 of 1 (latest)
Buttons only run their action scripts for left‑clicks. Right‑clicking them just opens the regular Minecraft context menu, so you can’t assign a “right‑click action” directly to a button.
What you can do instead is keep the normal button action for left clicks, and add a listener for On Mouse Button Clicked that specifically handles right clicks. Combine that listener with the Is Element Hovered requirement (point it at your button’s identifier) so it only runs when the mouse is over the button, and then check $$button == right inside the listener’s action script before executing the right‑click behavior.
- Action scripts: see Action Scripts for how to attach work to the button.
- Listener info: use the On Mouse Button Clicked listener (and the
$$button/$$mouse_posvariables) from the Listeners page. - Requirement reference: use Is Element Hovered from Conditions so the listener only triggers while the pointer is on your button.
This setup keeps the built-in left‑click action on the button while the listener handles right‑clicks.
This support thread has been marked as solved by @tiny lion.
The AI helper is now disabled, but you can still continue the conversation if needed. Thank you for using our support system!