Pets stuck in the same position

I’m attempting to make a pet system, and I’ve run into a problem that I can’t seem to figure out how to fix. This problem is when I equip 2 pets, both of those pets get stuck in the same position. I’m not really good at gyros and body positions, so I need help.

My code:

FoundPet:Clone().Parent = Player.Character.Head

					local BodyPosition = Instance.new("BodyPosition", Player.Character.Head:FindFirstChild(Pet).Main)
					BodyPosition.MaxForce = Vector3.new(math.huge, math.huge, math.huge)

					local BodyGyro = Instance.new("BodyGyro", Player.Character.Head:FindFirstChild(Pet).Main)
					BodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
					
					while wait(0.1) do
						BodyPosition.Position = Player.Character.HumanoidRootPart.Position + Vector3.new(1.5, 1.5, 2.5)
						BodyGyro.CFrame = Player.Character.HumanoidRootPart.CFrame
					end

Yes, the code is a bit messy but that’s because I pasted it from my script and it messed up the formatting on the forum.

I will also attach a screenshot of the pet stuck in the same place:
image

2 Likes

Are the pets anchored property on false?

2 Likes

Yes, they move and everything works. It’s just them sticking together while they are moving.