How to Replicate the PubG Mobile Interface

Hi guys, I was wondering if anyone had any ideas about how I could go about making a gun script that worked similar to the one found in PubG. I like the style, and I think it would be my best option for making mobile compatibility for my gun scripts.

The only problem is that I can’t make a button drag the camera like a classic camera while it’s also making the gun shoot. The camera won’t rotate when the player’s finger is on the button. I also don’t want to get extremely technical by making scriptable cameras and maneuvering the CFrame and all that, so what do I do?

Here’s a visual example of the layout I have in mind:

Thanks!

1 Like

Do you mean you want the button to be pressed like a regular button, but also turn the camera as if you touched the screen regularly? If so I think your best bet is to not use a button.

Make the appearance of the button using GUI objects besides buttons and text boxes, and make sure all of them have Active set to false.

After your ‘button’ is created, use UserInputService to get when a player taps their screen. If they tapped where the button is, run the code you would when the button is pressed.

2 Likes

I thought about this but I thought there might be a better way - I think that’s probably the way to go though. Thanks!

3 Likes