Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a way were your friends or select people can access a certain GUI?

Asked by 4 years ago

For an example lets say that a person has been selected to get an admin panel and only they and the other people can use it

0
I suppose you could keep the module script in server storage, check to see if the the playerID matches a whitelist, clone the module script over, then send a remote to the client telling it to look for the module script and run it. SteelMettle1 394 — 4y
0
There may be some security issues with that though, I guess once it's visible by the client, the client should clone it and the server delete it so that the module is now locally owned. SteelMettle1 394 — 4y
1
There is no way to completely hide that module from other clients since instances can't be transferred across the server-client boundary to simply one client. I suppose having a script run the check and then destroy the module may be effective, but exploiters can still snipe it and may try to prevent it from doing so. The easiest way, of course, would be to just secure the server-side. lolzmac 207 — 4y
1
My thoughts exactly, the code can definitely be sniped, but at least destroying the module will make it "harder." I think I may have took the question too literal when they said to "can access a certain gui." You're 100% correct, validation by the server is key. SteelMettle1 394 — 4y

2 answers

Log in to vote
0
Answered by
SteamG00B 1633 Moderation Voter
4 years ago

In server storage, you would keep a screen gui object including the local script controlling it for your admin panel, and in the server script service, you would have a script that checks if each player that joined is an admin, and if so, it will clone the screen gui into their player so that they have access to it when they spawn in. The admin panel will have to use remote events in order to do anything to the server just like any other local script.

This will prevent any exploiters from gaining access to your admin panel because they simply will never have access to it in the first place.

0
I didn't think this was possible with a local script because the local script was originally on the server. I may be mistaken, but I thought a local script will only run if it's compiled on the client at startup. Now that I think about it, my method wouldn't work either because the module script code was never compiled on the client. SteelMettle1 394 — 4y
0
I could very well be wrong though, but I do remember having problems with cloning a tool from server storage to the player with a local script inside. SteelMettle1 394 — 4y
0
The local script will not be running on the server because it is in the server storage. SteamG00B 1633 — 4y
Ad
Log in to vote
-1
Answered by 4 years ago
local player = game.Players.LocalPlayer
if player.UserId == "yourfriendsoryouruserid"  then--Keep doing this until everyone you want is on there
    else
    yourgui:Destroy()
end
1
No. There are 2 things wrong with that. 1) That's a local script, which is a HUGE security flaw, 2) Ignoring that this is a local script, you seem to be under the impression that an if statement is a loop. It is not. SteamG00B 1633 — 4y

Answer this question