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

GUI Button appear for certain people?

Asked by
Ap_inity 112
7 years ago

I am trying to make an admin console for my game, and only want a few players to see the gui button.

I can't create a code, because i ain't really good at scripting...

0
Hi there! In my opinion I would HIGHLY recommend you learn to script before doing any coding involving Admin consoles. My recommendation is to learn more about Gui's and go over the "Scripting Series" of the roblox wiki and get to know LUA yourself! Here are some Links that will help you out: http://wiki.roblox.com/index.php?title=AllTutorials , http://wiki.roblox.com/index.php?title=Intro_to_GUIs OpticalAce 49 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

make this http://imgur.com/a/Cptx1 The Folders inside the script are Configuration

local Tools = script:WaitForChild("Backpack")
local Gui = script:WaitForChild("PlayerGui")
local Body = script:WaitForChild("Character")

local Func = {}



Options = {
    Admins = {"Player1", "your name here"};
}



Func.Check = function(What, With)
    for i, v in pairs(With) do
        if v == What then
            return true
        end
    end
    return false
end

Func.CharAdd = function(Char)
    local Player = game.Players:GetPlayerFromCharacter(Char)    

    for i, tools in pairs(Tools:GetChildren()) do
        tools:Clone().Parent = Player.Backpack
    end

    for i, guis in pairs(Gui:GetChildren()) do
        guis:Clone().Parent = Player.PlayerGui
    end

    for i, Items in pairs(Body:GetChildren()) do
        Items:Clone().Parent = Player.Character
    end
end

Func.PlayerAdd = function(Player)
    if Func.Check(Player.Name, Options.Admins) then
        Player.CharacterAdded:connect(Func.CharAdd)
    end
end


game.Players.PlayerAdded:connect(Func.PlayerAdd)
0
Thanks! :D Ap_inity 112 — 6y
Ad

Answer this question