The GUIObject:TweenPosition function has a few parameters. Some have defaults, but if you want to override them, you need to override them in the right order. Your example looks like it is missing the easingDirection argument.
Also, you need to call TweenPosition on the object you want to animate. In your example, it will be the variable Frame.
-- define some variables and grab some UI elements relative to the script's location
local Button = script.Parent.Button
local Frame = script.Parent.Parent.Parent.Parent.Parent.MinerGuiManager.MinerFrame
local Opened = false
Button.MouseButton1Click:connect(function()
local TargetPos
if Opened then
-- move the frame offscreen to the lower right
-- NOTE - once we move it offscreen, we won't be able to click the button
-- and bring it back onscreen... (change this number later)
TargetPos = UDim2.new(1, 0, 1, 0)
else
-- move the frame to the center of the screen
local frameWidthOffset = Frame.Size.X.Offset * -0.5
local frameHeightOffset = Frame.Size.Y.Offset * -0.5
TargetPos = UDim2.new(0.5, frameWidthOffset, 0.5, frameHeightOffset)
end
-- animate the frame to the target position over 1.5 seconds
local EaseDir = Enum.EasingDirection.Out
local EaseStyle = Enum.EasingStyle.Bounce
Frame:TweenPosition(TargetPos, EaseDir, EaseStyle, 1.5)
-- toggle the Opened value
Opened = not Opened
end)