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

Only shows gui once?

Asked by
wackem 50
8 years ago

Yes, they get the tools, but the gui goes away once they die, I've already tried a Humanoid died function, didn't work either. This is the code:

local admins = {24181857}

game.Players.PlayerAdded:connect(function(plr)
for _,has in pairs(admins) do
    if plr.userId == has then
        local ct = game.ServerStorage.ClassicTool:Clone()
        local cot = game.ServerStorage.ConfigTool:Clone()
        local dt = game.ServerStorage.DeleteTool:Clone()
        local st = game.ServerStorage.StamperTool:Clone()
        local wt = game.ServerStorage.WiringTool:Clone()
        local ctb = game.ServerStorage.ClassicTool:Clone()
        local cotb = game.ServerStorage.ConfigTool:Clone()
        local dtb = game.ServerStorage.DeleteTool:Clone()
        local stb = game.ServerStorage.StamperTool:Clone()
        local wtb = game.ServerStorage.WiringTool:Clone()
        ct.Parent = plr:WaitForChild("StarterGear")
        cot.Parent = plr:WaitForChild("StarterGear")
        dt.Parent = plr:WaitForChild("StarterGear")
        st.Parent = plr:WaitForChild("StarterGear")
        wt.Parent = plr:WaitForChild("StarterGear")
        ctb.Parent = plr:WaitForChild("Backpack")
        cotb.Parent = plr:WaitForChild("Backpack")
        dtb.Parent = plr:WaitForChild("Backpack")
        stb.Parent = plr:WaitForChild("Backpack")
        wtb.Parent = plr:WaitForChild("Backpack")
        plr:WaitForChild("PlayerGui").AdminGui.Backing.Visible = true
    end
end
end)

1 answer

Log in to vote
0
Answered by 8 years ago

Well, I would put a local script in the Gui directly...

local admins = {24181857}
plr=game.Players.LocalPlayer

for _,has in pairs(admins) do
    if plr.userId == has then
        script.Parent.Visible=true
    end
end

0
Thank you! :) wackem 50 — 8y
0
Np, Any time. BobserLuck 367 — 8y
Ad

Answer this question