Game.Players.GlxkTerrence.Touched ("TextButton)"
else Game.Player.("Playerusername"):Kick
I made a gui for admins in my game but this script doesnt seem to work can someone help me?
1 answer
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.

9 comments
What exactaly you want to do? I can't know when looking just to the script
im confused
i know you think this makes sense but it does not
@Leamir, I want to make a gui for developers to kick a curtain player when you write it in textboX
You can't just post a small snippet of your code, you have to at least provide a whole if statement, this is really way too little to know what you are doing.
THAT IS MY CODE BRO
Oh
Please give the full code, not just part of it or else we cannot help you.
you dont understand how this works, no offense. you need to start somewhere simpler. try the cookbook on the roblox wiki