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 !
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)
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