Hi! I currently doing things with the Roblox PathFindingService. What I am trying to do is have a model get animated along the path that the Roblox PathFindingService created. I currently have the model animated to move forward along the path, however, the way I am rotating the model is not animated. And that's what I'd like to learn how to do.
Here is my script.
for i,v in ipairs(EditedPoints) do
if v ~= Points[1] and v ~= Points[#Points] then
while (v - Plane.PrimaryPart.Position).magnitude > 3 do
--Plane:SetPrimaryPartCFrame(CFrame.new(Plane.PrimaryPart.Position, v))
Plane:SetPrimaryPartCFrame(Plane:GetPrimaryPartCFrame() * CFrame.Angles(0, 0.1,0))
Plane:SetPrimaryPartCFrame(Plane:GetPrimaryPartCFrame() + Plane:GetPrimaryPartCFrame().lookVector * 0.1)
wait()
end
end
end
What's currently happening here is I'm using ipairs to go through all of the points and move the object accordingly. Inside of the ipairs it first rotates the model to face the direction of the point. This is what I'd like to animate. So it's smooth and not just a set direct. Next I'm using the direction of the model and moving it forward. This repeats until it is close to the point. And then the ipairs loop get's another point and the whole proccess repeats.
