Answered by
Azuc 112
6 years ago
You would need to do something along these lines, however keep in mind that using SetPrimaryPartCFrame will cause floating point precision errors over time.
01 | local tweenService = game:GetService( "TweenService" ) |
02 | local info = TweenInfo.new() |
04 | local function tweenModel(model, CF) |
05 | local CFrameValue = Instance.new( "CFrameValue" ) |
06 | CFrameValue.Value = model:GetPrimaryPartCFrame() |
08 | CFrameValue:GetPropertyChangedSignal( "Value" ):Connect( function () |
09 | model:SetPrimaryPartCFrame(CFrameValue.Value) |
12 | local tween = tweenService:Create(CFrameValue, info, { Value = CF } ) |
15 | tween.Completed:Connect( function () |