so i have this script, it works good but i want to spawn the pet the same size and direction as a part which is set as a varible called "PetSpawn"
function spawnPet()
local petModel, price = getRandomPet()
local newPet = petModel:Clone()
newPet.Parent = game.Workspace.GeneratedPartFolder
newPet:SetAttribute("CashToGive", price)
for _, v in pairs(newPet:GetDescendants()) do
if v:IsA("BasePart") then
for _, x in pairs(PetSpawn:GetDescendants()) do
if x.Name == v.Name then
--v.Size = x.Size
v.CFrame = x.CFrame
end
end
end
end
task.wait(3)
return newPet
end```