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

3 comments
Run the game and see if the
Module Scriptactually copied and parented to thecopyplaceOh yeah thx
will try