Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How do i make this tween size and centered while it tweens?

Asked by 8 years ago

Why wont this work?

script.Parent.ShopFrame:TweenSizeAndPosition(UDim2.new(0, 1000, 0, 1000), "Out", Enum.EasingStyle.Back, 1)
1
If my answer was correct, please accept it. Async_io 908 — 8y

1 answer

Log in to vote
6
Answered by
Async_io 908 Moderation Voter
8 years ago

You need two UDim2.news in order to use TweenSizeAndPosition.

One being for Size, then other Position. (That's in order)

script.Parent.ShopFrame:TweenSizeAndPosition(UDim2.new(Size Here), UDim2.new(Position Here), 'Out',  'Back', 1)

Also

I recommend using Offset.

Offset is the first set of values in a position/size.

I.E. If you were given the position 0.1, 100, 0.1, 100. The X-Offset is 0.1 and the Y-Offset is 0.1

Using offset is better since it will appear on the same area on ALL screens. If you use 0, 1000, 0, 1000 then that will show on different areas for every screen.

Ad

Answer this question