Tween Move issue

  1. What do you want to achieve? So I want to make a moving Model using tween

  2. What is the issue? The tween works although it moves everything to the exact position.

Hello what I’m trying to do is tween a model to make it move but everything is working the only problem is it moves everything to the the exact position. The position I put for it to go I just want that to be like the end position but I don’t want it to move like it does here’s a screenshot of before and after.

  1. **What solutions have you tried so far?**Youtub,Dev Form

Here is my script




local chil  = script.Parent:GetChildren()

for i, v in pairs(chil) do 
	if v:IsA("MeshPart") or  v:IsA("BasePart") then
		local root = v
local tweenservice = game:GetService("TweenService")
local Time = 20
local tweenInfo = TweenInfo.new(
	Time,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)

		local properties = {Position = Vector3.new(-13.832, 93.441, 8465.132)}

local tween = tweenservice:Create(root,tweenInfo,properties)

tween:Play()
	end
end

Maybe make a big Box around the entire boat make it transparent and cancollide off and weld that part to some part of the boat and try tweening that part

1 Like

You are tweening every part inside of the boat (which im assuming is modeled) to a location. So every part is moving towards that spot. To fix this problem all you have to do is first unanchor the model, then set models primary part to a object inside the model (like the boats hull), then add weld constraints from the primary part to every other part (You can use a plugin for this). Now if you use TweenService on the primary part, every other part will follow it in the correct position.

1 Like

It has a basic solution, first create a hitbox. Hitbox is a non-visible part or something that covers the whole model. Then un-anchor all the parts except the hitbox. After all, weld the all parts inside the model to the hitbox.

Then tween the hitbox to that position.

Do I anchor the Primary Part? and leave the other parts unanchored?

Primary part should be anchored

Ok Im trying it out right now.

So I tried it and I made sure I welded everything and Only the primary Part moves nothing else

Can you send the plugin? 30char

I did all the steps but it only moves the hitbox not the other parts and I welded all parts