How to make a Model tween whole model?

When I use Roblox’s TweenService with models inside of my games I struggle to find an efficient way to make the whole entire model Tween not just the PrimaryPart. What I want to know is how to tween the whole model not just the PrimaryPart to make the whole entire model tween or move.

Some things I’ve tried:

Union: First, my models have mesh parts so they do not union so this doesn’t work.

Children of PrimaryPart: Only the “PrimaryPart” is tweened not its children…

If you can help please do so! Thanks

1 Like

Found this after a quick Google search. I’m not sure if it still works since it has been a year ago, but give it a shot?

1 Like

The method is still valid and probably won’t go obsolete any time soon. I’ll post an update if that happens to become the case and, if I know of the alternative at the time, suggest that as well.

4 Likes

Hey, I used your post and my Output said it couldn’t cast value to object:

Plant = game.ReplicatedStorage.PlantingObjects.WheatSeed:Clone()
Plant.Parent = Soil
local PlantCf = Plant:GetPrimaryPartCFrame()
local SoilCF = CFrame.new(script.Parent.Position.X, script.Parent.Position.Y - 5, script.Parent.Position.Z)
PlantCf = Plant:SetPrimaryPartCFrame(SoilCF)
GrowTime = 10 / Divide
Tween = TweenInfo.new(GrowTime)
SoilCF = CFrame.new(script.Parent.Position.X, script.Parent.Position.Y, script.Parent.Position.Z)
PlantCf = Plant:GetPrimaryPartCFrame()
local TweenPlant = TweenService:Create(PlantCf, Tween, {Value = SoilCF})

That’s because Create expects an object to be passed as its first argument. You passed a CFrame instead. If you’re looking to use my tutorial, then I’d advise that you read the article in depth to understand how to apply it. I’d also recommend reading TweenService documentation on the Developer Hub if you are unfamiliar with its use.

For this line:

local TweenPlant = TweenService:Create(Plant, Tween, {Plant:GetPrimaryPartCFrame() = SoilCF})

It said Plant:getprimaryPartCFrame() was too complicated and it needed a name… Before mine was position…

I don’t know what kinds of warnings and errors you’re seeing. I don’t have enough information. Please read the article and TweenService documentation so you can figure out what you’re doing wrong and how to correct it. The previous line you wrote was correct, but what you were passing in the first argument was wrong.

Interesting how I also ran into this problem today. Here is an idea that I came up with that you guys may be able to build on for a cumulative best possible solution:

You can use
for i,v in pairs(Model:GetDescendants()) do to get all the things in the model. After that you can use an if statement to limit what you are trying to get for example: If v:IsA(“Part”). This ensures that you don’t get scripts or anything and try to tween them(resulting in errors) Lastly, you just tween it with tweenservice:Create(v, tweeninfo, {v.Position = (wherever you want)}). This works well but there is a problem.

Problem: It seems that when I tween everything however, it isn’t as smooth as :SetPrimaryPartCFrame animation-wise and just doesn’t look as good.

Note: I did this on a bus with so many parts, so it may be really helpful for you depending on what you are making. Hope this helps!

After reading colbert’s info I feel completely floored lol. It’s really good information.