Pet Following Issue | Pet Movement like Pet Simulator X

Pet Following Issue

It’s me, Flumzee, again. I’m working on a pet system, and I’m trying to make the pet following
part currently. Ever since I’ve ever done this, I’ve never been able to get it to work or figure
out a solution.

What I am Trying to Do

I’m trying to use a lerp, whilst also having a set CFrame (not lerped), still all in the setprimarypartcframe function.

Why I’m Trying to do That

If you’ve ever played pet simulator 2 or x, you know that they have a really good pet following
system. I’m trying to kind of replicate that with lerping. I’ve got the pets to stay on the ground, but now
I need to make the pet bounce up and down. Trying to do that within the lerp doesn’t work.

The Issue

Like I said above, trying to do the bounce up and down (math.sin wrapped in math.abs)
will not work. Though when I removed the whole lerp part, the pet bounced up and down perfectly fine.

Have I found a solution?

No, so far, I have not found any solution. I’ve tried many things, but 0 good results, just mainly my whole output filled with errors.

	    CFrame.Angles(0, yAngle, 0) --// turns the pet around to face the direction the player is moving in
		* CFrame.fromEulerAnglesXYZ(cos*1.75, 0, 0) --// rotate the pet for the animation ig
        ray.Position.Y+pet.PrimaryPart.Size.Y/2, character.PrimaryPart.Position.Z+z+pet.PrimaryPart.Size.Z), -- splits the pets into a circle around the player and does some coolio stuffz

If you have a possible solution, please send it to me, and I’ll try to implement it if I can. Even if you can’t think of a solution, thank you for looking in at this post and for your time.