Hi,
I am having a strange issue tweening a blocks size on the X axis only, I want it to grow and shrink but for some reason my code does this but also it does an odd shrink/move between see link to video as hard to explain.
Thanks for any help you can give.
local TweenService = game:GetService("TweenService");
local Part = script.Parent
local PartStart = script.Parent
local TweenInfo = TweenInfo.new(1 , Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, true, 0)
-- grow
local Goal1 = {
Size = Part.Size + Vector3.new(5, 0, 0),
CFrame = Part.CFrame * CFrame.new(5 / 2, 0, 0)
}
-- shrink
local Goal2 = {
Size = Vector3.new(PartStart.Size.X, 0, 0),
CFrame = CFrame.new(PartStart.Position.X, PartStart.Position.Y, PartStart.Position.Z)
}
local myTween1 = TweenService:Create(Part, TweenInfo, Goal1);
local myTween2 = TweenService:Create(Part, TweenInfo, Goal2);
while true do
myTween1:Play()
myTween1.Completed:Wait()
myTween2:Play()
myTween2.Completed:Wait()
end