Hello! Im a scripter, and making a pet following system currently, but the lookvector for the pet orientation is going bit weird.
I already dried finding some similar things on the devforum, but didnt found smth.
Im using CFrame, and pivotTo for the system
Heres some code thats going weird:
local LookPosition = Vector3.new(CharPosition.X,YRaycast,CharPosition.Z)
if PlayerMoving == true then
LookPosition = Character.PrimaryPart.CFrame.LookVector -- ignore the y for now
end
local NewCFrame = CFrame.new(Position,LookPosition)
CreatePetModel:PivotTo(NewCFrame)