I have been trying to solve this problem for 2 hours.
Workspace.TycoonModel.Script.MainScript:27: attempt to index nil with 'FindFirstChild'
This is the code:
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.Transparecy = 1 v.Button.CanCollide = false end
I don't know what to do at:
local Newitem = Boughtitems:FindFirstChild(v.Item.Value)
Please help! Thank you.
You could use WaitForChild or maybe you didn't define Boughtitems