local frame = script.Parent.Parent.Frame
script.Parent.MouseButton1Click:Connect(function()
frame.AnchorPoint = Vector2.new(0.5, 0.5) --change these both on the item
frame.Position = UDim2.new(-0.4, 0,0.5, 0)
wait(2)
frame:TweenPosition(UDim2.new(0.308, 0,0.185, 0)) --desired end location
end)
The script isn’t wrong. It’s a common issue with the studio screen size. You can go on the test tab then devices and choose your device so it correctly scales it. There are some plugins to automatically do it. [Plugin] AutoScale Lite for GUIs - Scale your UI
The gui when you click the button goes to the top of the screen and I want it in the center. I didn’t know if it was the script or something else so I added the script.