Egg animation stopping

local eggMesh = egg:FindFirstChild("EggMesh"):Clone()
	for i, v in pairs(eggMesh:GetChildren()) do
		if v:IsA("BasePart") then
			v.Anchored = true
			v.CanCollide = false
		end
	end
	eggMesh.Parent = camera
	local speed = 10 
	hatchOneConnection = RunService.RenderStepped:Connect(function()
		local cf = CFrame.new(0,0,-eggMesh.PrimaryPart.Size.Z * 2) * CFrame.Angles(0,0,math.sin(speed)/2)
		eggMesh:SetPrimaryPartCFrame(camera.CFrame * cf)
		if speed < 50 then
			speed += 0.01 * speed
		end
	end)
	
	wait(3)
	
	for i, v in pairs(eggMesh:GetChildren()) do
		if v:IsA("BasePart") then
			TweenService:Create(v,TweenInfo.new(0.5),{Transparency = 1}):Play()
		end
	end
	wait(0.5)
	hatchOneConnection:Disconnect()
	eggMesh:Destroy()
	


See how it stops at the end? Why is it stopping?

This is most likely being caused by a timing issue. The animation stops once the speed is greater than 50, and most likely the animation stops before it goes invisible.

It doesnt stop when it is at 50 though, it just caps at 50.