Tween Size help

So I made a tween size script as seen here:

script.Parent.MouseEnter:Connect(function()
	script.Parent:TweenSize(UDim2.new(0.12,0,0.12,0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, 0.2, true)
end)

script.Parent.MouseLeave:Connect(function()
	script.Parent:TweenSize(UDim2.new(0.1,0,0.1,0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, 0.2, true)
end)

and when it tweens size, it is supposed to get bigger from every side, but it just stretches from the bottom right. How do I make it get bigger on every side? If you want a video just ask…

You can play with the AnchorPoint of the GUI you are controlling. By default, the AnchorPoint will always be at the bottom right.

To change this, just simply type in the poperty of AnchorPoint: 0.5, 0.5

By doing this, it will move the point of origin to the center of the GUI. So whenever you tween your element, it will resize it from all sides.

2 Likes

Off topic, but how do you remove the dice thing on roblos studio that shows your XYZ?

If what you mean by View Selector being dice thing, go to the view tab and find the “View selector” option and turn that off.

I usually pre-see the target tween and record position and size. and vice versa for initial.

side note consider using tweenservice instead of using tweensize or equivalent: