Hi, my friend is trying to make a tycoon game and he’s getting this error:
Here’s the script:
--Buy Item/Dropper
for i,v in pairs(Buttons:GetChildren()) do
local NewItem = BoughtItems:FindFirstChild(v.Item.Value)
if NewItem ~= nil then
Items[NewItem.Name] = NewItem:Clone()
NewItem.Destroy()
else
v.ButtonPart.Transparency = 1
v.ButtonPart.CanCollide = false
end
if v:FindFirstChild("Dependency") then
coroutine.resume(coroutine.create(function()
v.ButtonPart.Transparency = 1
v.ButtonPart.CanCollide = false
if BoughtItems:WaitForChild(v.Dependency.Value, 10000) then
v.ButtonPart.Transparency = 0
v.ButtonPart.CanCollide = true
end
end))
end