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

How do I add GUI pages?

Asked by
xp3000 0
10 years ago
-- Here's the script for a page: 

player = script.Parent.Parent.Parent
backpack = player.Backpack

function chooseClass(class)
    for i, v in pairs(backpack:GetChildren()) do v:remove() end
    for i, v in pairs(class:GetChildren()) do
        if v:IsA("Tool") then
            v:clone().Parent = backpack
        elseif v:IsA("HopperBin") then
            v:clone().Parent = backpack
        end
    end
    script.Parent.Main.Visible = true
    wait(0.01)
    script.Parent.Main.Visible = false
end

for i, v in pairs(script.Parent.Main:GetChildren()) do
    v.MouseButton1Up:connect(function () chooseClass(v) end)
end

-- How do I make it so that it can also work for SECONDPAGE? And what would I do for a "Next" button, so that if it's clicked it reveals the SECONDPAGE Frame?

0
Just make the second page visible systematicaddict 295 — 10y

Answer this question