TweenService on a model (vector3)

Hi, I know there are many similar topics to this

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.

1 Like

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.

It’s a vector3 tweenservice though

Have a look at this thread. You can do something similar and just tween a value (calling the function on .Changed).

Performance won’t be great I assume though; Roblox runs a collision check whenever size changes

2 Likes

Thanks, going to try a similar method

Yes. A part has a Vector3 property which can be tweened.

I know but I want to tween the entire model at the same time while the welds are attached

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.

But isn’t setting cframe the position??

He’s trying to tween the size of the model, not the position of it. He wants to tween it like you’d change model size using studio tools.

note to OP: size can’t be Vector3(0,0,0), the minimum size is Vector3(0.05,0.05,0.05)

oh my god i’m tweening size pls

Then how do I make my part shrink into nothing?

I’m trying to make an animation where the weapon on my back shrinks into nothingness and reappears in my hands

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 would not recommend a size animation for this.

9 Likes

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.

What you could do is have a for loop and then change the size like NewSize = Vector3.new(Size.X*.1,SizeY*.1,SizeZ*.1) and then make those a tween

1 Like

I am tweening size not position

I wasn’t replying to you though? I’m aware you’re trying to tween size and not position, I’ve already posted a reply regarding it.

You yourself even acknowledged this post.