Hello. I am trying to tween a part’s size, but when it tweens, it tweens in the - direction and the +. I only want it to go +. Is this even possible? I think it has to do with CFrame
Here is the code. I just want to know what to change. Thank you
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(3.2, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0)
local part = game.Workspace.Part
local goal = {Size = Vector3.new(10, 0.25, 0.25)}
local tween = tweenService:Create(part, tweenInfo, goal)
tween:Play()
Hi. I don’t understand what you mean. Are you trying to make the tween move indefinitely, unlike how it usually is set to a destination ahead of time?
Edit: Sorry, I think I understand now. It’s because it increases the part’s size from both sides, right? The only way I’ve gotten around that is by setting the part’s position along with the size. So add +1/2 of the part’s growth amount?
For example, you have a part that is (5, 1, 1). The goal is for the size to be (10, 1, 1). Position += Vector3.new(part.size.x / 2, 0, 0). Sorry, I don’t know any other way of doing this other than compensating for the half change in position