How would i get the players userid from their name?

This is a brief explanation of the approach.

In your LocalScript on the GUI, you will do something similar to what u have. When the add button is clicked, you will fire a remote event. Will be catched on a Server Script in ServerScriptService, that script will contain a table, the user id will be stored in there.
(the remote should be secured, by only allowing players in the table to use the remote and connected function)

That table will be auto populated when the script starts (each time server starts), it will retrieve information from datastore about all admins in the game and fill the array with that id’s. And it will be updated from the remote too

When someone joins, the server script will decide if the player can have the GUI panel or not, by checkin if player is on the table (means admin), and clone the GUI and give it to the player.

(Im gonna make a little system like that right now, contact me if u have doubts, I can share some basic code for you to use too)

1 Like

please share some of the system because im a noob at scripting and only know the basics!

1 Like