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

Dropdown not functioning (close mechanism broke it)?

Asked by
unmiss 337 Moderation Voter
9 years ago
local black = false

function dondrop()
    if black == false then
script.Parent:TweenPosition(UDim2.new(0.5, 100,0.5, 225), "Out", "Quad", 1)
wait(0.1)
black = true
script.Parent.DonateTitle.TextLabel.Text = "Close Donate"
    elseif black == true then
script.Parent.Position = UDim2.new(0.5, 100,0.5, -500)
black = false
script.Parent.DonateTitle.TextLabel.Text = "Donate"
    end

script.Parent.Parent.Donate.MouseButton1Down:connect(dondrop)


the elseif is supposed to make it so that when it's already dropped down, it will go back up again to the invisible-land if you click "close donate".. otherwise there's no way to close it.

0
Where's the error? Anything in the output? woodengop 1134 — 9y
0
Nothing in the output. unmiss 337 — 9y
0
Well, I removed my answer since it was wrong. Are you sure the hierarchy is correct? Shawnyg 4330 — 9y
0
Everything after line 9 makes it function incorrectly-everything before it works fine (until you remove everything after line 9)... I added the elseif and 'black' variable to add the ability to move it up to invisible-land. I'm not sure what else to do, but I need an ability to close it. unmiss 337 — 9y

1 answer

Log in to vote
0
Answered by
unmiss 337 Moderation Voter
9 years ago

I added about 2 more ends in the bottom of the script and it magically started working. What a surprise..

studio didn't even notice or care.

0
I don't see how it would require 2. It would only require 1, but ok Shawnyg 4330 — 9y
0
check it as answered dragonkeeper467 453 — 9y
Ad

Answer this question