How to change how tween make this part bigger

Normally on tween size, size of part is only growing bigger on a specific direction, what i want to achieve is that to make the part bigger on its left instead of right.

Illustration
The part normally gets bigger here :
image
What i really want is to make the part bigger in this direction:

image


local TweenService = game:GetService("TweenService")


wait(10)
local Info = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)

local Size = {
	Position = Vector3.new(script.Parent.CFrame.X + 7.5, script.Parent.CFrame.Y  , script.Parent.CFrame.Z),
	Size = Vector3.new(16, 20, 22)

}

TweenService:Create(script.Parent, Info ,Size):Play()
wait(1)

local Info = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)

local Size = {
	Position = Vector3.new(script.Parent.CFrame.X- 7.5, script.Parent.CFrame.Y, script.Parent.CFrame.Z),
	Size = Vector3.new(1, 20, 22),


}
TweenService:Create(script.Parent, Info ,Size):Play()
1 Like

You can modify the Pivot of the part such that it is positioned at the far right, after which subsequent changes to it’s size on the x axis will only scale towards the left direction. Alternatively you can use a method of the part called part:Resize(normalId, delta). For the normal id you can provide Enum.NormalId.Left and for the delta you can probably tween a NumberValue (preferred as long as you destroy the NumberValue after tweeting) or lerp a number with the alpha value obtained from TweenService:GetValue (not preferred).

You can just move it using CFrame half the resize value in the direction you are Tweening the size to.

For example if you resize it 10 studs in the X direction you can CFrame it 5 studs in the ToObjectSpace X direction.

Could please elaborate this one, does this work perfectly in tweening?

You can tween multiple properties in the same Part. Example scripts are here. TweenService | Documentation - Roblox Creator Hub