The official way to do this is to create a root part, weld everything to it, then tween the root.
The main issue is though for some reason my parts arent following the root around.
heres my code:
if clone:IsA("Model") then
rootPart = Instance.new("Part")
rootPart.Size = Vector3.new(0.1, 0.1, 0.1)
rootPart.Name = "root"
rootPart.Anchored = true
rootPart.CanCollide = false -- avoid collision with world while tweening
rootPart.Transparency = 1
rootPart.CFrame = clone:GetPivot()
rootPart.Parent = clone
pcall(function() clone.PrimaryPart = rootPart end)
for _, v in ipairs(clone:GetDescendants()) do
if v:IsA("BasePart") and v ~= rootPart then
local weldC = Instance.new("WeldConstraint")
weldC.Part0 = v
weldC.Part1 = rootPart
weldC.Parent = v
end
end
else
rootPart = clone
end
local tween = TweenService:Create(rootPart, TweenInfo.new(t, Enum.EasingStyle.Linear), {Position = endPos})
tween:Play()
tween.Completed:Wait()
As you can see I weld everything to the root and then tween the root but for some reason the root moves but the parts attached dont.
Hey, i’m pretty sure that if anything else of the model that is not the root part is anchored, it won’t tween.
Pretty tired so unsure but, if it doesn’t work let me know.
There are two ways to set this up:
Option A:
Anchor only the root part, and weld all of the unanchored parts to the root and then tween the root
Option B:
Use RunService and lerp the CFrame of the model (Use :PivotTo() to move the model)