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

How do I make a GUI visible for a specific rank? [closed]

Asked by 3 years ago
Edited 3 years ago

I am working in a game. Now I need a help in making the GUI only for the owner and the developers of the game. So please help me how can do this.

Closed as Non-Descriptive by JesseSong

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
sleazel 1287 Moderation Voter
3 years ago

You should not really ask for scripts at this page, but I am in good mood today. Here is an example local script (parented to the GUI, that is set invisible by default).

--here is your table, add as many lines as you like
local ADMINS = {[00000000] = true, --replace with your user id
                [12345678] = true, --replace with dev id
                [-1] = true} -- for testing (Id of Player1 in server tests)

local player = game:GetService("Players").LocalPlayer

if ADMINS[player.UserId] then
    script.Parent.Visible = true
end

Remember that for every remote event, check UserId on server too, or you may have just opened the door for exploiters. Good luck!

0
ok thanks for helping me. Toxicheroking77 -8 — 3y
Ad