Animate a Frame sliding on and off screen. Great for menus and panels.
-- GUI Slide-in / Slide-out local TweenService = game:GetService("TweenService") local gui = script.Parent local frame = gui:WaitForChild("MenuFrame") local openButton = gui:WaitForChild("OpenButton") local tweenInfo = TweenInfo.new(0.4, Enum.EasingStyle.Quint, Enum.EasingDirection.Out) local isOpen = false local OPEN_POS = UDim2.new(0.5, 0, 0.5, 0) local CLOSED_POS = UDim2.new(0.5, 0, 1.5, 0) frame.Position = CLOSED_POS openButton.MouseButton1Click:Connect(function() isOpen = not isOpen TweenService:Create(frame, tweenInfo, { Position = isOpen and OPEN_POS or CLOSED_POS }):Play() end)