Attempt to call a nil value with a table

Today, i been trying to make ui module, but i kept geting the same error.

ModuleScript

local module = {}
module.__Index = module

local ListOfAllInstancesName = require(script.ModuleScript)

function module.New()
	local self = setmetatable({},module)
	
	
	return self
end

function module.CreateInstance(instanceType,Parent,Tab)
	assert(typeof(instanceType) == "string","Invaild not string")
	local ReturnWithNewInstance = nil
	
	-- Create A Table that check to see if a New Instance is creating inside table
	if typeof(Tab) == "table" then
		local Newinstance = Instance.new(instanceType,Parent)
	
		for TableIndexName, newProperties in pairs(Tab) do
			if TableIndexName == ListOfAllInstancesName[TableIndexName] then
				-- There Suppost to be nothing here
			else
				Newinstance[TableIndexName] = newProperties
				self.Parent = Newinstance

			end
			
		end
		
		return Newinstance
	end
end

function module.CreateExtraInstance(instanceType,Tab)
	assert(typeof(instanceType) == "string","Invaild not string")
	assert(typeof(Tab) == "table","Invaild not string")

	if not self.Parent == nil then
		
		local NewObject = Instance.new(instanceType)
		for TableNewIndex,NewProperties in pairs(Tab) do
			NewObject[TableNewIndex] = NewProperties
		end
	end
end


return module.New()

LocalScript

local Players = game:GetService("Players")
		local LocalPlayer = Players.LocalPlayer or Players.PlayerAdded:Wait()
		local PlayerGui = LocalPlayer:FindFirstChildWhichIsA("PlayerGui")
		local ExpectInstance = require(ReplicatedStorage:FindFirstChild("ModuleScripts"):WaitForChild("ExpectInstance"))

		local BlackFrame = ExpectInstance.CreateInstance("ScreenGui",PlayerGui,{
			Name = "BlackFrame";
			DisplayOrder = 3;
			Enabled = true;
			IgnoreGuiInset = true;
			
			ExpectInstance.CreateExtraInstance("Frame",{Size = UDim2.new(1,0,1,0)});
		});

For some reason the self says that it a unknown gobal

try to uncapitalized the I in Index. It should just be __index. You also need to use : when using functions for class modules instead of .

Thanks, but im still having a problem with modulescript. when im creating a another instance with CreateExtraInstance. it still nill when using CreateInstance self.parent