So I made a script related to my egg hatching system, and I am making triple hatch.
However, only 2 eggs work. It is parented to the current camera like normal, but it just doesn’t show up on screen. No errors. Please help.
Script:
hatchOneConnection = RunService.RenderStepped:Connect(function()
local cf = CFrame.new(0,0,-eggMesh.PrimaryPart.Size.Z*2) * CFrame.Angles(0,0,math.sin(time()*18)/2.3)
local cf2 = CFrame.new(6,0,-eggMesh2.PrimaryPart.Size.Z*2)*CFrame.Angles(0,0,math.sin(time()*18)/2.3)
local cf3 = CFrame.new(3,0,eggMesh3.PrimaryPart.Size.Z*2)*CFrame.Angles(0,0,math.sin(time()*18/2.3))
eggMesh:SetPrimaryPartCFrame(camera.CFrame * cf)
eggMesh2:SetPrimaryPartCFrame(camera.CFrame*cf2)
eggMesh3:SetPrimaryPartCFrame(camera.CFrame*cf3)
end)
eggMesh.Parent = camera
eggMesh2.Parent = camera
eggMesh3.Parent = camera
print("Hatching")