Game.Players.GlxkTerrence.Touched ("TextButton)" else Game.Player.("Playerusername"):Kick
Hello, I don't really now what you mean but I'm sure this will help you in a sort of way.
First you're going to create a table, imagine it as your own little school lunchbox, but with the Admin's Names in it.
It'll look like this.
local admins = { "admin1", "admin2" }
And now you're going to insert a PlayersAdded function, meaning everything after the PlayersAdded function will be executed.
game.Players.PlayerAdded:Connect(function(plr) end)
Make sure you use a capital for the C in Connect as connect is deprecated.
Now in this little function we're going to have a check. A check is like one of those Airport Systems, it checks if their is illegal things in your suitcase/bags. But in this situation we'll be checking if the Player Joined(PlayerAdded) is an Admin.
Insert the following into the PlayersAdded function
if plr:FindFirstChild("Humanoid") then -- Checking if the PlayerAdded is an actual Player if plr.Name = (1, #admins) then -- Seeing if they're an Admin plr.PlayerGui.ScreenGui.TextButton.Visible = true print("An Admin has joined, be careful") end else print(plr.Name "Is not an Admin") -- Printing the Player joined is not an Admin end end
Hope this helped, also you'll need to use a RemoteEvent, but I don't really understand what you're trying to say, but this will give you a pretty good explanation on how to code your script.
Closed as Non-Descriptive by User#5423
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?