What specifically is the "ButtonX" KeyCode?

I am making abilities for my game, and they need ui prompts to tell the player what buttons to press to use the abilities and items. It works fine, and I am detecting the general platform well, but I am having trouble figuring out if the “ButtonX” key bind is the cross on the playstation controller, or simply the left button like xbox, the square. Putting “X Or Other” is kinda confusing, does anyone know which of the 2 it is for playstation?

KeyCode enums were added way before Roblox even considered having PlayStation as a supported platform. This means you should always assume that the enums are referring to the Xbox buttons and their respective positions.

^ This is it

2 Likes

Ok, thank you for this information.

Just to add, the keycode itself represents both Xbox and PlayStation input under the hood. For telling players what button to press, though, like in UI, I refer to this:

PS:

For future reference, which is what I personally use, one of roblox’s docs provides this image that shows all the inputs for a controller.

So if you ever dont know what a button does, you can refer to this image to help you out :D

Also the docs in question:

3 Likes

Thanks, this will definitely be useful

1 Like

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