Help with tweening a model

Before I begin, I have already checked out Introduction to Tweening Models

So, I have a giant model made up of about 30 parts that I want to move with tweenservice, and I have all the parts welded (using WeldConstraints) to a singular root part covering the entire model. I also made sure to have the model’s primary part set to the root, and when I run my script the actual root part moves but the welded parts do not move at all, they just stay stationary. I have the root part anchored with the other parts all unanchored as well. Can somebody please explain why this is happening? Here’s the script part:

local TweenService = game:GetService("TweenService")

local Chain = workspace.Chain
local Part = Chain.PrimaryPart
local Folder = workspace.ChainTween
local Start = Folder:WaitForChild("Start")
local End = Folder:WaitForChild("End")

local ChainSlideInfo = TweenInfo.new(
	150,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.Out,
	0,
	false,
	0	
)

while true do
	local Tween = TweenService:Create(Part, ChainSlideInfo, {Position = End.Position})
	Tween:Play()
	wait(150)
	Part.Position = Start.Position
end

Try tweening the CFrame instead. I do believe that Position should work in this case regardless because the parts are connected by WeldConstraints, but my experience is typically better when I tween the CFrame. I couldn’t tell you why this is the case.

If that does not work for you, could you supply an image of the object and maybe its object hierarchy as well? Knowing if there are any (non-)physical blocks or overlooked details in your model could be the definition between this working and not.

Just as an example of an oversight, I’ve had issues with door tweens in my game to figure out that some developers didn’t have “Join to Surface” turned off while moving doors so welds were being created where not intended.

1 Like