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

Where did i mess up?

Asked by
iiTiago 15
9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

I am trying to make a script which when you click a button a frame pops up and when you press the X in the top right of the frame it closes but I'm confused where i went wrong.

-- iiTiago 2K16

local Mainf = script.Parent
local active = Mainf.Teams.active.Value

function open()
    if active == false and Mainf.Visible == false then
        print("1")
        Mainf.Visible = true
        active = true
    elseif active ~= false and Mainf ~= false then
    print("Team Frame is already activated")
    end
end



Mainf.IconCloseButton.MouseButton1Down:connect(function()
    active = false
    Mainf.Visible = false
    Mainf:TweenPosition(UDim2.new(0.5,-150,-1,-100),'Out','Quad',0.35)
end)



Mainf.Parent.TeamsB.MouseButton1Click:connect(open)




0
i don't think you need the active parts, just use visible theCJarmy7 1293 — 9y
0
Alright ill test it now iiTiago 15 — 9y
1
I'm not understanding what you need. Explain in detail what you're attempting to do. Acheo 230 — 9y
0
Its fixed @Acheo iiTiago 15 — 9y

Answer this question