if Torso.Parent:WaitForChild("Humanoid").MoveDirection.X == 0 then
self:GetWalking()
Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame:Lerp(Torso.CFrame * CFrame.new(4,-3,0) * CFrame.fromOrientation(0,70,0), Step * 5))
WalkBool = false
else
self:GetWalking(true)
Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame:Lerp(Torso.CFrame * CFrame.new(4,-3,0),Step * 5))
WalkBool = true
end
When walking this line sometimes breaks and says CFrame is nil.
Model:SetPrimaryPartCFrame(Model.PrimaryPart.CFrame:Lerp(Torso.CFrame * CFrame.new(4,-3,0) * CFrame.fromOrientation(0,70,0), Step * 5))
I am using Humanoid to animate pet.