--(Here is what I tried coding with I want the project to tween from the bottom of the screen upward and back down separately when clicked multiple times. But only with one button to control this. I am not great at coding so I have tried searching on Youtube and also through peoples creations have yet to get this to work with a single button. Can someone help give me the solution to this? If not it is alright I can just use a two button method I guess.)
function pressed()
local ShopFrame = script.Parent.Parent.ShopFrame
local toggle = false
if not toggle then
toggle = true
ShopFrame:TweenPosition(UDim2.new(0, 75,1, 10), 'Out', 1)
ShopFrame.Visible = false
else
toggle = false
ShopFrame:TweenPosition(UDim2.new(0, 75,0.2, 10), 'Out', 1)
ShopFrame.Visible = true
end
end
script.Parent.MouseButton1Down:connect(pressed)

3 comments
Thank you so much this worked almost entirely.Changed local Shop to = script.Parent.Parent.ScrollableFrame, local selected = 1, and input the correct positions.
Also added the Tween at the beginning of the script to close it instantly.
No problem glad to help