Why is my pets Y way below the player even though I set it to be the humanoid root part cframe?

I am attempting to make my system of pets be able to wrap around the player automtically no matter what but for some reason when I play the game my pet is position underground around the player instead of next to him. I got this method from @OverHash on this post Having multiple 'pets' at once?

NOTE:
I use a custom character mesh

here is my update code

 local petSpring = Spring.new(Vector3.new())
    petSpring.Damper = 1
    petSpring.Speed = 100

    local function UpdatePetPosition()
        local newPosition = (self.Character.HumanoidRootPart.CFrame * CFrame.new(MathUtil.GetPointOnCircle(25, 360/1))).p - Vector3.new(0, self.Character.HumanoidRootPart.Size / 2, 0) + Vector3.new(0, PetMesh.Size.Y, 0)
        petSpring.Target = newPosition
        PetMesh.CFrame = CFrame.new(petSpring.Position)
    end

    self.Maid:GiveTask(RunService.Stepped:Connect(UpdatePetPosition))
    self.Maid:GiveTask(PetMesh)

here is my GetPointOnCircle Function

function MathUtil.GetPointOnCircle(CircleRadius, Degrees)
	return Vector3.new(math.cos(math.rad(Degrees)) * CircleRadius, 0, math.sin(math.rad(Degrees)) * CircleRadius)
end
1 Like

Hey jakebball11.

It looks like in your example code you left out the most important part? I don’t see any place where you update the Position property of petSpring, please update the post or reply with the full code.

oh yah sorry, I thought I included it in. I updated to add my stepped connection.

I realized it was an issue with my pet being uncahored causing it too fall.