A rough idea on multiple pets system

Hi Guys , so I like simulators , even I’m making one , but the part I’m stuck with is multiple pets , I can make 1 pet equip system easily , but I’m wondering how can I make multiple pets system , it took my sleep , help will be appreciated a lot ! :slight_smile:

Thanks

The most basic one i know is just making the pet’s go in a half circle, you could just divide 180 by the amount of pets you’re equipping in a for loop and just use CFrame.Angles(0, math.rad(degree), 0) and offset it by CFrame.new(0, 0, -distance from char)

Ok , I’ll try it for sure and tell you if it helps !

Somethin like

local function IndexPetHalfCircle(PetCount)
   local degree = 180 / PetCount
   local distanceFromChar = 5 --5 studs away from character
   local offset = CFrame.new(0, 0, distanceFromChar) --not negative to make the pets behind the player
   for idx = 1, PetCount do
      local Pet = somePetTable[idx] --example only

      local rot = math.rad(degree * idx)
      Pet.CFrame = PlayerHumRp.CFrame * CFrame.Angles(0, rot, 0) * offset
   end
end
1 Like

Ok , thanks for your help , I’ll try and tell you

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.