Why part stops rotating after parent is clone?

I have a viewport that have a part in there, script should rotate part that will added, but after script is being cloned (with part that should rotate) it won’t rotate, also I cannot see print.

script.Parent.AncestryChanged:Connect(function(hand)
	
	local part
	
	for _, v in ipairs(hand:GetChildren()) do
		
		if v:IsA("ViewportFrame") then
			
			for _, w in ipairs(v:GetChildren()) do
				
				if not w:IsA("Script") then
					
					part = w
					
				end
				
			end
			
		end
		
	end
	
	while wait(0.001) do
		part.CFrame *= CFrame.Angles(0, 0, 0.05)
	end
	
end)

-- modified part

if script.Parent.H1 then
	
	print("exist") -- it works!
	
        while wait(0.001) do
	    script.Parent.H1.CFrame *= CFrame.Angles(0, 0, 0.05)
               print("it also works!") -- this print also works

	end
end