--Let the world load before starting

wait(1)


function Render(Character)

	ViewPort:ClearAllChildren()
	--Render the character
	local Char = instance("Model")
		Char.Name = ""
		Char.Parent = ViewPort
	RenderHumanoid(Character,Char)
end



function module:MakeDupe (Character, V)
	--Handle changes 
	-- These cause disapear
	--Character.DescendantAdded:Connect(Render)
	--Character.DescendantRemoving:Connect(Render)
	
	--Initialize
	
	if (V) then
		ViewPort = V;
		ViewPort.CurrentCamera = Camera;
	end
	
	Render(Character);
	
	local CameraUpdater = RunService.Heartbeat:Connect(function()
		Character = Player.Character;
		if Character:FindFirstChild("HumanoidRootPart") then
			Camera.CFrame =  cf(Character.HumanoidRootPart.CFrame:toWorldSpace(Offset).p, Character.HumanoidRootPart.CFrame.p)
		end
	end)
	
end

return module;
