How to stop parts/pets from tilting up when following player?

When the pets (aka puppies) moves and follows my character, they tilt up. How would I make it where it the blocks will always follow and point straight to their designated vector3 and not tilt up?

I am using a BodyGyro and BodyPosition to move the pets. Is it something I need to tweak with the BodyPosition power/dampening or with how the CFraming of the BodyGyro is?

Example screenshot
RobloxScreenShot20200427_150224053

part of script that moves pet

	while true do	
	wait()
	
	for _, Puppies in pairs(PuppyChildren) do	

	---Puppies Body stuff	
	local PetPos = Puppies.BodyPosition
	local PetGyro = Puppies.BodyGyro
	
	-- player owner
	local Owner = player.Name
	
	-- owner position
	local OwnerObj = game.Workspace:WaitForChild(Owner)
	local OwnerPos = OwnerObj.HumanoidRootPart.Position
	
	
	--- Puppies random vector
	local PetVector = Puppies.PetVector


-- if player is moving do this
if Humanoid.MoveDirection.Magnitude > 0 then
	
	PetPos.P = 150
	PetPos.D = 100
	
	
	PetPos.Position = OwnerPos + PetVector.Value
	PetGyro.CFrame = CFrame.new(Puppies.Position, OwnerPos + PetVector.Value)


-- etc
-------------------------------------------------------------------

o/ ty

1 Like

Tried messing with that and all it does is make my pets get stuck and jitter up and down.

That is because you are making the pets face the HumanoidRootPart. As seen in the picture, the pets are slightly lower in y position than the humanoid root part. To fix the problem, simply remove this line:

PetGyro.CFrame = CFrame.new(Puppies.Position, OwnerPos + PetVector.Value)
1 Like

I managed to get it to work. I realized that the Pet’s position and where the pet was supposed to be facing/looking at was at the exact same position. To fix it, I added another Vector3.new to the look at point so the pet would be looking towards distance rather looking where it was positioned. Now I just gotta fix other parts of my script but Ill managed that. Thanks guys (: