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

I made a gui for admins in my game but this script doesnt seem to work can someone help me? [closed]

Asked by 5 years ago
Game.Players.GlxkTerrence.Touched ("TextButton)"
else Game.Player.("Playerusername"):Kick
0
What exactaly you want to do? I can't know when looking just to the script Leamir 3138 — 5y
0
im confused DinozCreates 1070 — 5y
0
i know you think this makes sense but it does not DinozCreates 1070 — 5y
0
@Leamir, I want to make a gui for developers to kick a curtain player when you write it in textboX GlxkTerrence 5 — 5y
View all comments (5 more)
0
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. SteamG00B 1633 — 5y
0
THAT IS MY CODE BRO GlxkTerrence 5 — 5y
0
Oh DinozCreates 1070 — 5y
0
Please give the full code, not just part of it or else we cannot help you. B_rnz 171 — 5y
0
you dont understand how this works, no offense. you need to start somewhere simpler. try the cookbook on the roblox wiki Gey4Jesus69 2705 — 5y

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?

1 answer

Log in to vote
1
Answered by 5 years ago

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.

Ad