I am fully aware that Roblox isn’t interested in giving devs the ability to see the players current platform, but unfortunately there is a usecase where this is needed.
As a Dev, if we want to show xbox buttons or playstation buttons based on the platform type, we effectively have to use a hack like this:
function IsPlaystation()
return UserInputService:GetStringForKeyCode(Enum.KeyCode.ButtonA) == "ButtonCross"
end
Otherwise I wouldn’t be able to show/hide the correct gamepad icons that I’ve purposefully given the player (ex below)
I’m not alone in this issue, I’ve talked to other devs who use similar hack workarounds as the only other option is to use the coregui gamepad buttons which can really limit creative expression.
I had to solve this problem as well for my button class and Virtual Valley Games’s games. My hack relies more replacing individual images when they are requested, as opposed to performing a global check for the platform. I think a better way of describing this feature request is we need an official way to provide platform-specific button icons, because figuring out and testing my solution is just too much work to provide themed buttons.
Shouldn’t the request be to check what kind of controller the player is currently using? If a player wants to use their Xbox controller with their PC (AKA me, although not on Roblox), just requesting platform won’t cut it.