Ok I will let the script talk for itself:
-- this function is called on a touched event local function createButtonsAndItems(serverBaseplate, tycoonBaseplate, savedItemsTable) for i,v in pairs(serverBaseplate:FindFirstChild("PurchasableItems"):GetChildren()) do if findAMatch(savedItemsTable, v) then local copy = serverBaseplate.PurchasableItems:FindFirstChild(v.Name):Clone() if copy:FindFirstChild("ItemType") then if copy.ItemType.Value == "Dropper" then copy.Parent = tycoonBaseplate:FindFirstChild("PurchasedItems") local oreMakerCopy = game.ServerStorage.ModuleScripts:FindFirstChild("OreMaker"):Clone() oreMakerCopy.Parent = copy wait() require(oreMakerCopy)
inside the module script:
wait(3) print(script.Parent.Name)
Output:
OreMaker:2: attempt to index field 'Parent' (a nil value)
the error is on line two of the module script
you cant print parents or scripts. Try making a seperate variable instead. Example:
wait(3) local var = script.Parent.Name print(var)
This should work!