After I click on the GUI, the code executes, but have to wait 5 seconds or less for me to click the Gui again, how can I fix this?
local frame = script.Parent.Parent.Parent:WaitForChild("Test")
local open = false
script.Parent.MouseButton1Down:connect(function()
if open == false then
frame:TweenPosition(UDim2.new(0.5, 0,0.1, 0), "Out", "Bounce", 1)
open = true
else
frame:TweenPosition(UDim2.new(0.5, 0,-1, 0), "Out", "Bounce", 1)
open = false
end
end)

2 comments
connectis deprecated ;)I edited it. It says "connect" now ;)