Issue with my Pet Renderer

Hello, I have a pet system where players are able to buy and equip pets which follow them around. It functions perfectly but in my game, players are teleported to different maps and when they’re teleported, the pets do not come with them. The pet stays at the last known location before the player was teleported and doesn’t go to the new teleported location. I’ve tried numerous ways to make it so theres a detection in the script to see if the player is far away, if so, the pets data resets and goes back to the player, but it hasn’tbeen working. The pet renderer script is below:

local ReplicatedStorage = game:GetService("ReplicatedStorage")

-- Config
local PET_ATTACHMENT_OFFSET: Vector3 =, 3, 0.5)

local PET_ALIGN_POSITION: AlignPosition ="AlignPosition")
PET_ALIGN_POSITION.Responsiveness = 5

local PET_ALIGN_ORIETANTATION: AlignOrientation ="AlignOrientation")

local Pets = ReplicatedStorage:WaitForChild("Pets")

local Shared = ReplicatedStorage.Shared
local SharedUtils = Shared.Utils
local SharedData = Shared.Data

local PlayerUtil = require(SharedUtils.PlayerUtil)
local AttributeUtil = require(SharedUtils.AttributeUtil)
local Attributes = require(SharedData.Attributes)

local PetRenderer = {}

function PetRenderer.EquipPet(character: Model, petName: string)
	if character:FindFirstChild("___pet") then
	local pet: Model = Pets:FindFirstChild(petName):Clone()
	-- incase of some weird accessory overlap
	pet.Name = "___pet"

	local petAttachment: Attachment = pet:FindFirstChild("MovementAttachment", true)
	local characterAttachment: Attachment = character:WaitForChild("Torso"):WaitForChild("PetCarrierAttachment")

	pet.Parent = character

	local function setupConstraint(constraint: AlignPosition | AlignOrientation)
		constraint.Attachment0 = petAttachment
		constraint.Attachment1 = characterAttachment
		constraint.Parent = pet


function PetRenderer.Start()
	PlayerUtil.ObserveCharacters(function(character: Model)
		local torso: BasePart = character:WaitForChild("Torso")
		local petCarrierAttachment: Attachment ="Attachment")
		petCarrierAttachment.Name = "PetCarrierAttachment"
		petCarrierAttachment.Position = PET_ATTACHMENT_OFFSET
		petCarrierAttachment.Parent = torso

		AttributeUtil.ObserveAttribute(character, Attributes.EquippedItems.EquippedPets, function()
			if not character:GetAttribute(Attributes.EquippedItems.EquippedPets) then
			PetRenderer.EquipPet(character, character:GetAttribute(Attributes.EquippedItems.EquippedPets))

return PetRenderer

I’ve looked things over, and it seems the attachments come with the player when they teleport, but the pet mesh itself does not come with it. The way it is setup is that there is a model, and within the model are 2 attachments and then the pet mesh itself. I’m still unable to figure out how to make the pet mesh come along with the attachments