How to show the ContextAction Buttons even while playing in a PC?

The automatic creation of the buttons in ContextActionService is great!
How can I show the same buttons while running the game in a PC/Windows?

image

Your best option is to check if UserInputService.TouchEnabled is true, and if not, make your own buttons that call the bound function.

You can use ContextActionService:GetButton to return the actual button that you would’ve for a touch device, but it seems like you need to handle its parenting/destroying manually for now.

1 Like