How to make a UI button on Mobile screen when clicked, show a GUI on PC user Prospective as well as a GUI on Mobile user Prospective

  1. What do you want to achieve? Basically I want it so that when you click a button on a mobile user, 2 GUIs will pop up. One on the Mobile screen, and one on the computer screen.

  2. What is the issue? I don’t know how to achieve this. I have tried using a local script to tell when a specific text is put in a PC GUI and if it is entered in a Mobile Text Box and clicked a mobile UI Button then a Mobile Main Menu kind of screen will appear on the Mobile user’s device. The same thing should happen for the PC user’s device. A PC version of the Main Menu should appear on the PC user’s device. I managed to get the Mobile Main Menu UI script working, but not the PC’s UI script.

  1. What solutions have you tried so far? I’ve tried making it so that the PC main menu screen is opened automatically when you click a small UI. However this ruins the magic of a Phone to PC Connection kind of thing. So I want it to look like the Phone is connected to the PC. This is where the code should go. I’ve also tried implying the PC UI script below the main function of the button click.

    However that doesn’t work as well. This is where I kept all the code for this.

You should use button.TouchTap if you’re going for mobile controls, Not UserInputService!

They’re trying to see if it’s a pc, though. This would require a TextButton to click, which may or may not get annoying after awhile.

So for the PC one, I’d recommend leaving out the Mobile (TouchEnabled) part of the if statement; If there’s a keyboard and mouse, it’s pretty safe to assume it’s a PC.

I don’t think I was as clear sorry. I meant that when the function runs, the actual GUI will appear on the PC player’s screen. But the function runs through the mobile side using a UI that is only accessible to the mobile screen. The mobile main menu screen works just fine but I can’t make it work so that the PC UI shows. Also you said it’s safe to assume that it’s a pc. However sometimes that isn’t the case. Since sometimes the Roblox app on PC will give you mobile controls. Not sure why though.

You can use context action service for binding a mobile button click to a PC function. ContextActionService | Roblox Creator Documentation

I don’t want to bind a mobile button to a Pc button, instead, I want it so that imagine there are two players, one on PC and the other on mobile. I want it so that when the player on Mobile clicks something, it affects the person with the PC.