What's wrong with this script?

Hello, I have been working on a pet but I have some problems with it, I want the pet to always face a certain way with bodygyros and it works but when I tween the pet’s CFrame the bodygyro stops working how can I make it work while the pet is tweening?
Here is my code for tweening:

local TweenService = game:GetService("TweenService")
local partToTween = script.Parent
local clickDetector = partToTween:FindFirstChildWhichIsA("ClickDetector")
local inTween = false

-- Customizable variables
local TWEEN_TIME = 0.25
local TWEEN_ROT_ANGLES = -45

-- Tween variables
local tweenInfo = TweenInfo.new(
	TWEEN_TIME,  -- Time
	Enum.EasingStyle.Quad,  -- EasingStyle
	Enum.EasingDirection.Out,  -- EasingDirection
	-1,  -- RepeatCount (when less than zero the tween will loop indefinitely)
	true  -- Reverses (tween will reverse once reaching its goal)

local function activateAction()
	-- If the object is tweening, prevent it from being tweened again
	if inTween == true then

	-- Calculate new CFrame for object position and rotation
	local offsetCFrame = CFrame.new(0, TWEEN_MOVE_DISTANCE, 0)
	local rotatedCFrame = CFrame.Angles(math.rad(TWEEN_ROT_ANGLES), 0, 0)
	offsetCFrame = offsetCFrame:ToWorldSpace(rotatedCFrame)
	local newCFrame = partToTween.CFrame:ToWorldSpace(offsetCFrame)

	-- Create a tween and play it
	local tweenObject = TweenService:Create(partToTween, tweenInfo, {CFrame = newCFrame})
	inTween = true

		inTween = false


Here is my other script for rotating:

local part1 = script.Parent-- The part that will turn to face Part2
local part2 = game.Workspace.Part2

while true do
	part1.BodyGyro.cframe = CFrame.new(part1.Position, part2.Position)

Both of these scripts are from the developer hub,How do I fix this?
Thank you!

Edit: I tried to make them one script but I still get the same results

Is there a way to get the body gyro to act like a tween?

I want to get a body gyro to do this:

Not the hopping, just the rotating but I want it to still face a certain part.

This is done by tweenservice and I want the same thing with bodygyros

But I want the rotating like you see on the video it rotates from left to right how can I do that with a bodyGyro?