-
What do you want to achieve? Hello. I am trying to make a pet hatching system. When you get close to the egg, the pets from the egg are shown and they spin around.
-
What is the issue? The issue is all of the pets are in the same square and I want all the pets in different squares.
-
What solutions have you tried so far?
I haven’t found any solutions yet.
for i,v in pairs(Eggs:GetChildren()) do
local eggPets = Pets:FindFirstChild(v.Name)
if eggPets ~= nil then
local billboardTemp = script.Parent.Parent.Template:Clone()
local container = billboardTemp:WaitForChild("Container")
local MainFrame = container:WaitForChild("MainFrame")
local template = MainFrame:WaitForChild("Template")
local display = template:WaitForChild("Display")
billboardTemp.Parent = script.Parent.Parent.EggBilboards
billboardTemp.Name = v.Name
billboardTemp.Adornee = v.EggMesh
billboardTemp.Enabled = true
for _, pet in pairs(eggPets:GetChildren()) do
local clonedTemp = template:Clone()
clonedTemp.Name = pet.Name
clonedTemp.Rarity.Text = tostring(pet.Rarity.Value).."%"
clonedTemp.Visible = true
clonedTemp.Parent = MainFrame
local petModel = Module3D:Attach3D(display,pet:Clone())
petModel:SetDepthMultiplier(1.2)
petModel.Camera.FieldOfView = 5
petModel.Visible = true
runService.RenderStepped:Connect(function()
petModel:SetCFrame(CFrame.Angles(0,tick() % (math.pi * 2),0) * CFrame.Angles(math.rad(-10),0,0))
end)
end
Any help would be greatly appreciated!