Welds or tweens?

I have a Tower defense game in which I am currently trying to figure out the best way to have lots of enemies, without bad performance. My question is simple. Should I tween every part in a model to the tower, or should I tween only the PrimaryPart, and have unanchored parts welded to it? Which one would have better performance? In case my question isn’t clear, which is better, tween 15 parts, or tween 1 part, but have 14 others welded to it.

  • Use welds.
  • Use tweens for every part.

0 voters

1 Like

Its not super clear what you are trying achieve. Typically though I would say one tween is better than many.

2 Likes

I mean, should I tween 15 parts individually, or should I tween 1 part, and have 14 other parts welded to it. In the end, it will look the same. I am just wondering which is better.

1 Like

If the result is the same then most def only do a single tween. The only reason to tween individually would be to allow variation in each part.

1 Like

So having extra welds would make no difference in performance?

1 Like

It would be less than many tweens no doubt.

2 Likes

Even if you would weld everything to one Primary part and then tween just the Primary part, it would tween just the Primary part and nothing else. If you wish to move entire models there exists Model:MoveTo() and Model:PivotTo(). TweenService cannot tween entire models easily unfortunately.

1 Like

If you tween a PrimaryPart’s CFrame, and have unanchored parts welded to it, they move with it.

2 Likes

I would recommend using Tweens for a few reasons, but the main one that pops out at me for a Tower Defense game is the notion of waypoints.

Being able to give the enemies a specified path using Tweens is not only simpler, but you need not mess with Object Spaces between the tower and each enemy.

To create a tween path with waypoints, please see:

1 Like