How can I make xbox and playstation support?

Now that Playstation is playable on roblox, I’m really wondering how can I code a script to support playstation controls?

Is it the same as xbox support?

4 Likes

im pretty sure it is, but i would say look out for updates!
makes sense though, xbox and playstation are both a controller either way

1 Like

Checking off the ability to support console joins will both enable Xbox and PlayStation support for you game as the key codes are the exact same across consoles.

So, if your game already supports Xbox controller inputs, they will automatically be mapped to fit with PlayStation controllers.

3 Likes

Yes, Xbox support is very similar to Playstation support. Supporting Playstation and Xbox is pretty simple, for example KeyCode.ButtonA is the A button on Xbox and the Cross button on PlayStation.

Here's an example of the 4 buttons matches

Top is PlayStation, bottom is Xbox.

For example Y on Xbox is triangle on playstation, and the KeyCode to use is KeyCode.ButtonY.

You can get an image for a keycode using UserInputService:GetImageForKeyCode(), which will return a Content that can be used for the image, and is automatically configured to show Play Station icons when a play station controller is connected, and Xbox icons when a Xbox controller is connected.

You can make console and VR controllers vibrate using HapticService (this also applies to mobile phones too which is cool!!)

Yes, if your experience already supports Xbox it’ll work on PlayStation too, but you should also ensure you show the right keycodes for PlayStation users so make sure to use UserInputService:GetImageForKeyCode().

Here’s a pretty cool article by Roblox with more info about designing for console: Console Development Guidelines | Documentation - Roblox Creator Hub

I hope this helps!

6 Likes

Honestly while the GetImageFromKeyCode icons aren’t the best at the moment they are definitely very useful for speeding up development for different devices, would 100% recommend using it.

1 Like

Thanks a lot!

I was also wondering how to fix issues like not being able to move while using a controller?

If youve got your controller connected to PC in studio, Ive found out that you need to focus the play test window. you can do that vy clicking in the play test window then switching to using controller.

No like I can’t move at all ether on pc or ps4/ps5. Is it something with the game settings cause whenever I go into another game it works perfectly fine.

that could be an issue, does it happen when you play the game on pc with the game client? and does it affect xbox too? if u dont have an xbox controller u can give me a link to the game

I’ve used both roblox studio and the game client and the same issue happens

I’m using a ps5 controller but I don’t know if that’s the problem

feel free to test it here though Acute Mayhem - Roblox

I just tested your game with an Xbox controller on PC and character movement doesn’t work for me either. If you’re using a custom character movement script, make sure it supports console.

Client-Side Console Logs


alright I’ll loo into it thanks man!

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