Gui tweening problem

local btn = script.Parent
local frame = game.StarterGui.Shop.gui


btn.MouseButton1Click:Connect(function()
	frame:TweenPosition(
		UDim2.new(0.5, 0,0.5, 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Sine,
		2,
		false,
		nil
	)
end)

There are no errors but the gui dosent tween

btn.MouseButton1Click:Connect(function()
	frame:TweenPosition(
		UDim2.new(0.5, 0,0.5, 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Sine,
		2,
		false
	)
end)

If you don’t want a callback, just leave it blank.

You tweened the frame in the StarterGui. You need to tween the frame in the player’s GUI, aka the parent of the LocalScript that you have in there:

local button = script.Parent
local frame = button.Parent.gui -- Repeat parent until it is the shop GUI's gui

button.Activated:Connect(function()
	frame:TweenPosition(
		UDim2.new(0.5, 0, 0.5, 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Sine,
		2,
		true
	)
end)