Pet following script not working

My pet following script isn’t working, for some odd reason. It works, it teleports the pet to me, but it never follows behind me. I know that I’m using AlignPosition’s and AlignOrientation’s even though I wanna achieve a smooth effect, but at this point I’ve been trying for over 2 days now and I just want any solution. Hopefully this script could help with solving my issue:

local plrs = game:GetService("Players")
local rs = game:GetService("ReplicatedStorage")
local accessories = rs:WaitForChild("PlayersAccessories")
local somePet = rs:WaitForChild("Pet") -- This pet actually is something, but I don't wanna leak what it is.. (its a part btw not a model)

local function makePet(plr, chosenPet, dist)
	local char = plr.Character or plr.CharacterAdded:Wait()
	repeat 
		task.wait() 
	until char:FindFirstChildOfClass("Tool") or plr:WaitForChild("Backpack"):FindFirstChildOfClass("Tool")
	
	local hrp = char:WaitForChild("HumanoidRootPart")
	local newPet = chosenPet:Clone()
	newPet.CFrame = hrp.CFrame

	local charAttachment = Instance.new("Attachment", hrp)
	charAttachment.Visible = false
	charAttachment.Position = Vector3.new(tonumber(dist), 1, 0) + newPet.Size

	local petAttachment = Instance.new("Attachment", newPet)
	petAttachment.Visible = false

	local alignPos = Instance.new("AlignPosition", newPet)
	alignPos.MaxForce = 25000
	alignPos.Attachment0 = petAttachment
	alignPos.Attachment1 = charAttachment
	alignPos.Responsiveness = 25

	local alignRot = Instance.new("AlignOrientation", newPet)
	alignRot.MaxTorque = 25000
	alignRot.Attachment0 = petAttachment
	alignRot.Attachment1 = charAttachment
	alignRot.Responsiveness = 25

	newPet.Parent = char
end

plrs.PlayerAdded:Connect(function(plr)
	local s, r = pcall(function()
		plr.CharacterAdded:Connect(function(char)
			if plr then
				local char = plr.Character
				if char then
					makePet(plr, somePet, 1)
				end
			end
		end)
	end)
end)

And here’s the path to the script:
image
I can provide more information if needed.
I’ve also tried BodyGyro’s and BodyPosition’s.