How to make a SurfaceGui accessible to the player that is using it?

  1. I would like to make a SurfaceGui that only works for the player that is using the system. For example, if the user meets the requirements to interact with the SurfaceGui it should only work for them when they are using it. (I want it to be visible for all players)

  2. The main issue is that I can’t find anything or any resources to make this possible and most posts are about to make them visible or invisible for others.

  3. I haven’t found any topics really near what I’m trying to achieve currently.

Thanks, ixnventx.

Then couldn’t you just check if a players meets the requirements?

Have it check

Example:


local Controller

--// when you have the panel open for them, you can set the Controller value to that player

--// for whatever functions you only want that player to do:
if Player ~= Controller then return end
1 Like

Put the SurfaceGui under the part for everyone that you want to be able to see it, and put the SurfaceGui under the player that you want to allow interaction with under their PlayerGui folder. If you want the interactions such as text boxes to show, you’ll have to use remotes.

Care to explain more in-depth, please?

If you want everyone to see it, including changes, but only 1 person be able to access it, you have to specify that person. How do you want it to work? When the game starts it picks a random person, or the first person to interact with it gets it?

Use a SurfaceGui parented to StarterGui with the Adornee set to the part you want the SurfaceGui applied to. This lets you change the SurfaceGui on the client.

2 Likes

I have made an example experience demonstrating how to do this.
https://www.roblox.com/games/8483460751/Control-Demo


I was really bored today. Can you tell?

1 Like

Well, it will only be the duration of the local player’s usage. When the system starts they are the local controller but when they close the system it will still make them the controller until the next player interacts with the system. (@busterbob64 I will look at later since I’m on mobile.)

Thanks for helping me out! I really appreciate it! (For those who want to figure out to use it, go to the place and press the eclipse, and press edit.)