-
What do you want to achieve?
I want Part1 to go into Part2, then after that, I want them to go to a certain position. -
What is the issue?
Part1 successfully goes inside of Part2, but after that, they do not go to “-3, 16.5, 58”
Here is a video so you can see what I mean.
robloxapp-20220222-1822526_Trim.wmv (353.7 KB)
Here is my code:
local lerpFolder = script.Parent
local part1 = lerpFolder.Part1
local part2 = lerpFolder.Part2
for i = 0, 1, 0.01 do
wait()
part1.CFrame = part1.CFrame:Lerp(part2.CFrame, i)
end
local function moveParts()
for i = 0, 1, 0.01 do
wait()
part2.CFrame = part2.CFrame:Lerp(CFrame.new(-3, 16.5, 58), i)
part1.CFrame = part1.CFrame:Lerp(CFrame.new(-3, 16.5, 58), i)
end
end
while true do
wait()
if part1.CFrame == part2.CFrame then
moveParts()
break
end
end