--[=[
	Observes an instance's ancestry

	@param instance Instance
	@return Observable<Instance>
]=]

function RxInstanceUtils.observeAncestry(instance)
	local startWithParent = Rx.start(function()
		return instance, instance.Parent
	end)

	return startWithParent(Rx.fromSignal(instance.AncestryChanged))
end
