Currently working on a game that requires specific inputs and am working on adding support for other consoles.
Great! GamepadEnabled helps detect they’re using a controller but not what kind of controller. XBox and PlayStation controllers have differently shown buttons even though they do the same thing. For less confusion, I’d love to tell the player what the button they need to press is. I can script this visualization for one controller but not the other. Leaving the other users to wonder what button that correlates to if they’ve never seen that type of controller before.
I see there’s a platform enum with many different platforms, ones that Roblox isn’t even supported on, and couldn’t find any way to call for these. Will there ever be a way to see what platform a player is running on or is there already one I haven’t seen yet?
Already exists.
local keyIcons = {
["ButtonCross"] = "rbxassetId://1",
["ButtonA"] = "rbxassetId://2",
}
print(keyIcons[UserInputService:GetStringForKeyCode(Enum.KeyCode.ButtonA)])
Not sure of other methods to do this but hey, it works.
If you’re cool with Roblox-provided images you can also cut out the middle man: GetImageForKeyCode