So, I made the following code change the position of the Screen GUI when the user clicked the text button,
script.Parent.MouseButton1Click:connect (function() script.Disabled = true for i = 0.1, 1, 0.1 do script.Parent.Parent.Position = UDim2.new(0,0,0-i,0) end end)
But as stupid as it sound, I don't know how to get the screen GUI back to the position it was with another textbutton. If anyone knows, that's be great.
That method would work, but it'd be best to use :TweenPosition for a smoother transition and it is also a lot more simpler.
script.Parent.MouseButton1Click:connect (function() if script.Parent.Parent.Position == UDim2.new(START POSITION) then -- This will make sure if the Button is ready to be opened/closed script.Parent.Parent:TweenPosition = UDim2.new(NEW POSITION) -- Opens elseif script.Parent.Parent.Position == UDim2.new(NEW POSITION) then -- Checking again script.Parent.Parent:TweenPosition == UDim2.new(START POSITION) -- Closes end end)