Egg billboard GUI display issue

  1. 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.

  2. 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.

  1. 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.Camera.FieldOfView = 5
			petModel.Visible = true

				petModel:SetCFrame(CFrame.Angles(0,tick() % (math.pi * 2),0) * CFrame.Angles(math.rad(-10),0,0))

Any help would be greatly appreciated!


By the looks of it, you are parenting them all to the uncloned templates display.

This might fix it:

local petModel = Module3D:Attach3D(clonedTemp:WaitForChild("Display"),pet:Clone()) -- instead, we use the cloned templates display

Thanks. It worked! Have a great day/night :slight_smile:

1 Like