Answered by
7 years ago Edited 7 years ago
First we get the original CFrame of the primary part
then we setup the lerp like this
1 | local cf = script.Parent:GetPrimaryPartCFrame() |
2 | for i = 0 , 1 ,. 005 do wait() |
3 | script.Parent:SetPrimaryPartCFrame(script.Parent:GetPrimaryPartCFrame():lerp((cf*CFrame.Angles(math.rad( 90 ), 0 , 0 )),i)) |
That example was for rotating 90
This example is for moving to 0,0,0
1 | for i = 0 , 1 ,. 005 do wait() |
2 | script.Parent:SetPrimaryPartCFrame(script.Parent:GetPrimaryPartCFrame():lerp((CFrame.new( 0 , 0 , 0 ),i)) |