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")
spawn(function()
print("Spawn is working")
local loopWaitTime = copy:WaitForChild("LoopWaitTime")
local oreValue = copy:WaitForChild("OreValue")
local dropperPart = copy:WaitForChild("DropperPart")
if loopWaitTime and oreValue and dropperPart then
while true do
print("Loop started")
wait(loopWaitTime.Value)
local newOre = Instance.new("Part")
newOre.Name = "Ore"
newOre.Parent = copy
newOre.Size = Vector3.new(1, 1, 1)
newOre.Position = dropperPart.Position
game.Debris:AddItem(newOre, 20)
local cash = Instance.new("NumberValue")
cash.Name = "Cash"
cash.Parent = newOre
cash.Value = oreValue.Value
print("no problems")
end
end
end)
simply put the script prints loop started but it does not print no problems. Note: All copies are created ok.

1 comment
I tested and the script isnt making it past the wait