But I want to know how to change the Vector3 (size) property of the model instead of CFrame
Current script:
function dissappear(model)
local tweenService = game:GetService("TweenService")
local part = model.Handle
local tweeningInformation = TweenInfo.new(1,Enum.EasingStyle.Quint,Enum.EasingDirection.In,1, false)
local partProperties = {
Size = Vector3.new(0,0,0);
}
local Tween = tweenService:Create(part,tweeningInformation,partProperties)
Tween:Play()
end
Current script only tweens the handle of the model but I want the whole model to be tweened
You’d have to tween each part and then offset it relative to a primary part. There is no way, other than individually modifying the size of each part, to resize a model completely.
On another note, to address your similar topic, I published a better method if you’re looking to tween a model’s CFrame or position as opposed to the size. That’s available here.
When I tween a model, I get a basic part to be tweened on the server, and on the client I position the model to the basic part, using run service.
Not the most ideal as it’s ran by the client, but I wasn’t using it for anything too important.
Tween one part on the server, and use a render stepped/changed function on each client and use :SetPrimaryPartCFame each frame/when it moves.
I explained this earlier.
To answer the question in the original post literally, you don’t. Tweenservice can only be used on one instance in a single tween, so if you have more instances you will need to create multiple tweens. The problem with doing this is none of your tweens will be synchronized. The model will behave as if you offset random Parts tweens by some small amount of time.
You can work around this by instead tweening a value instance from 1 to 0 and setting part size to be a product of the original size and the value when changed fires on the value. However, even though this fixes the synchronization problem, the problem is you’re wanting to do this on a jointed model. All of the joints will break when you change the size of the parts. Even worse, is that Roblox has a minimum part size, so 1) it’s impossible to scale a part down to size 0, and 2) this limit is not fair to all of your parts. If you’re able to resize one part by 50%, you may only be able to resize another by 25% because 1 of its axes is already really close to the minimum part size.
I should point out that if WeldConstraints are being used, resizing/repositioning welded parts will not break the weld, but merely recalculate the offset in such a way that the welded part stays the same distance from the center of the resized part.
This is off-topic to the OP, but I want to let you know that this is not a good way to tween a model. Your model will eventually crack due to float point errors that SetPrimaryPartCFrame has. To save you the trouble of linking my entire post, a better method is to weld all your parts to an invisible root, unanchor everything except that root then tween the root. Just beware of explosion instances.