I'm currently developing a game that includes animals. The animals are supposed to wander around and when I was making a script to do so, I stumbled across the problem of the animal not facing the way I want it to face when I make it move around. Here's my script (for your reference)
local humanoid = script.Parent:WaitForChild('Humanoid')
local pp1 = script.Parent.Parent:WaitForChild('PathingPart1')
local pp2 = script.Parent.Parent:WaitForChild('PathingPart2')
local pp3 = script.Parent.Parent:WaitForChild('PathingPart3')
script.Parent.PrimaryPart = script.Parent:WaitForChild('Head')
---
while humanoid.Health > 0 do
wait(5)
script.Parent:SetPrimaryPartCFrame(???) -- Supposed to make the model rotate towards the part it's moving to
humanoid:MoveTo(pp1.Position) -- Moves the model
wait(5)
script.Parent:SetPrimaryPartCFrame(???) -- Same goes for here
humanoid:MoveTo(pp2.Position) -- Moves the model
wait(5)
script.Parent:SetPrimaryPartCFrame(???) -- And here aswell
humanoid:MoveTo(pp3.Position) -- Moves the model
end
Thank you for taking some to read/answer/comment on this question

3 comments
Thank you for your lightning-fast response :-)
Another problem came up. When I used the method you taught me, the model faced the opposite way as it moves. (E.G. When it's moving forwards, it's facing backwards) Is there any fix to this problem?
This would be because the model was not built to face the lookVector. You could multiply the velocity by -1, or multiply the final cframe by a CFrame.Angles.