So I am currently working on a GUI that involves a lot of TweenPosition and basically I have a script that makes my GUI pop up from the bottom of the screen to the middle of the screen from the click of a button and then if the button is clicked again it will go back down...
here is the script:
local frame = script.Parent.Parent.Parent.Parent:WaitForChild('ShopGUI').Buttons
script.Parent.MouseButton1Click:connect(function()
if toggle == false then
frame:TweenPosition(UDim2.new(0,435,0,800), 'In', 'Back', 0.5)
toggle = true
else
frame:TweenPosition(UDim2.new(0,435,0,220), 'In', 'Back', 0.5)
toggle = false
end
end)
So I have this script to toggle a GUI on and off the screen but I want the GUI to just to go off the screen ... but I don't know how to do it... if anybody can help me do this it would be amazing. THANK YOU!!

4 comments
So you want it to scroll down, but no longer scroll up again? Your question is pretty vague.
So basically I just want the GUI to go down off the screen when I click the button
Yes, your question is pretty vague and makes no sense. If you want it to go away once something happens, simply add in the Tween to that event like how you have it set up for the MouseButton1Click event.
From the looks of your code, 'toggle' isn't defined anywhere outside the code; in other words, from my assumption, your indexing 'toggle' as a value, but it's a nil value in this case.