Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Dropdown not functioning (close mechanism broke it)?

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.

4 comments

0

Where's the error? Anything in the output?

0

Nothing in the output.

0

Well, I removed my answer since it was wrong. Are you sure the hierarchy is correct?

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.

1 answer

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.

2 comments

0

I don't see how it would require 2. It would only require 1, but ok

0

check it as answered

This discussion is preserved as it was. New answers, comments, and votes are closed.