local uc = Instance.new("Folder")
uc.Name = "UpgradeCost"
uc.Parent = bon
local attrUC2 = config:FindFirstChild("UpgradeCost")
attrUC2:SetAttribute("uc", 440) -- error on this line
Why do you believe that? I would see that as the case if you use Instance | Roblox Creator Documentation but if it returns nil you can just set a default value or what ever value you like.
i want to create this through a server script it cant be done inside studio it has to be in a remote function server side, i created the folder no problem i just want to create the upgradecost number value in the folders properties
local uc = Instance.new("Folder")
uc.Name = "UpgradeCost"
uc.Parent = bon
-- folder made ezpz
local uc2 = Instance.new("NumberValue")
uc2.Name = "UpgradeCost"
uc2.Value require(blah blah blah from my modulescript)
uc2. -- no parent i want it inside folder properties