I am having problems with this system I’ve created (Its not the full finished version), there are 2 types of pets normal and huge, for normal pets the system works great but for huge pets the positioning is off and I’ve spent days trying to figure out a solution but I just cant right now so I’m looking for help.

This is what its doing

I want the huge pets the be spaced apart the equivalent distance that the normal pets are but for whatever reason this is quite a challenge

```
local player = _GLOBAL_.Services.Players.LocalPlayer
local petsDisplayed = {}
local petsDisplayedHuge = {}
local petsOrdered = {}
local petsOrderedHuge = {}
local petRows = {}
local petRowsHuge = {}
local order = 1
_GLOBAL_.Services.RunService.Heartbeat:Connect(function()
--// Render [ petsDisplayed ]
local char = player.Character
if char and #petsOrdered >= 1 or #petsOrderedHuge >= 1 then
local lookVector = char.PrimaryPart.CFrame.LookVector
local charLocation = char.PrimaryPart.CFrame.Position
local rightVector = -char.PrimaryPart.CFrame.RightVector
local leftVector = char.PrimaryPart.CFrame.RightVector
local petDistance = 2.5
local petDistanceSide = 2.5
local petNumber = 1
local baseLocation = charLocation + Vector3.new(-lookVector.X * petDistance, -lookVector.Y - 0, -lookVector.Z * petDistance)
local charLook = charLocation + lookVector
local lookat = Vector3.new(charLook.X, baseLocation.Y + 0, charLook.Z)
local function RenderPetsOfType(rows: any, petSize: number, lastNormalRow: number)
local ordered = petsOrdered if petSize == 2 then ordered = petsOrderedHuge end
petNumber = 1
for rowNumber, petsPerRow in rows do
local petsToSide = math.floor(petsPerRow / 2)
local hasMiddlePet if petsPerRow / 2 ~= petsToSide then hasMiddlePet = true end
baseLocation = charLocation + Vector3.new(-lookVector.X * (petDistance * (rowNumber + lastNormalRow)), -lookVector.Y + 0, -lookVector.Z * (petDistance * (rowNumber + lastNormalRow)))
--// Pets to the left
for i = 1, petsToSide, 1 do
if ordered[petNumber] and ordered[petNumber]['pet'] and ordered[petNumber]['pet']:FindFirstChild('PetCFrame') then
local addVector = Vector3.new()
local pet = ordered[petNumber]['pet']
if not hasMiddlePet then addVector = (leftVector * Vector3.new(petDistanceSide, petDistanceSide, petDistanceSide)) / Vector3.new(2, 2, 2) end
pet.PetCFrame.Value = pet.PetCFrame.Value:Lerp(CFrame.new(baseLocation + ((leftVector) * i) * petDistanceSide - addVector, lookat), 0.01)
petNumber += 1
end
end
--// Pets in the middle
if hasMiddlePet then
if ordered[petNumber] and ordered[petNumber]['pet'] and ordered[petNumber]['pet']:FindFirstChild('PetCFrame') then
local pet = ordered[petNumber]['pet']
pet.PetCFrame.Value = pet.PetCFrame.Value:Lerp(CFrame.new(baseLocation, lookat), 0.01)
petNumber += 1
end
end
--// Pets to the right
for i = 1, petsToSide, 1 do
if ordered[petNumber] and ordered[petNumber]['pet'] and ordered[petNumber]['pet']:FindFirstChild('PetCFrame') then
local addVector = Vector3.new()
local pet = ordered[petNumber]['pet']
if not hasMiddlePet then addVector = (rightVector * Vector3.new(petDistanceSide, petDistanceSide, petDistanceSide)) / Vector3.new(2, 2, 2) end
pet.PetCFrame.Value = pet.PetCFrame.Value:Lerp(CFrame.new(baseLocation + ((rightVector) * i) * petDistanceSide - addVector, lookat), 0.01)
petNumber += 1
end
end
end
return #rows
end
local normalRender = RenderPetsOfType(petRows, 1, 0)
petDistanceSide = 5
petDistance = 7
local hugeRender = RenderPetsOfType(petRowsHuge, 2, normalRender)
end
end)
```