local primary = sampleModel.PrimaryPart
for i = 0.01, 1, 0.01 do
task.wait()
local goal = unit.Main.CFrame + Vector3.new(0, 1, 0)
sampleModel:SetPrimaryPartCFrame(primary.CFrame:Lerp(goal, i))
end
You can do sampleModel:PivotTo(primary.CFrame:Lerp(goal, deltaTime * 10)
(SetPrimaryPartCFrame is deprecated. “deltaTime” is the time between each frame.)
game:GetService("RunService").RenderStepped:Connect(function(deltaTime)
--This function fires every frame the game steps. Delta time is the time it takes to do that.
end)