-
What do you want to achieve? I want the ninja legend shop effect to work
-
What is the issue? arugment 1 missing or nil in my sillohoute system
-
What solutions have you tried so far? looked at changing image clr
for i,class in next,Shared:WaitForChild("Classes"):GetChildren() do--getting classes
if class:IsA("Folder") then
local price = class:FindFirstChild("Price")--setting price(works)
local imgid = class:WaitForChild("Imgid")--setting img(works)
local order = class:FindFirstChild("Ordercl")--setting the order of the scrolling frame(works)
local prevclass = Shared:WaitForChild("Classes"):FindFirstChild(order.Value - 1)--setting up the tool
local temp = clshop.ImageLabel.ScrollingFrame.Template:Clone()--cloning my imagebtn
temp.Name = class.Name--setting everything
temp.Parent = clshop.ImageLabel.ScrollingFrame
local priceval = Instance.new("StringValue")
priceval.Name = "Price"
priceval.Value = price.Value
priceval.Parent = temp
if order.Value ~= 0 and plr.Ownedcl:FindFirstChild(prevclass) then temp.Name_Of_object.Text =temp.Name else temp.Name_Of_object.Text = "???" end-- trying to change text(idk if it works since saying argument 1 missing or nil)
temp.clpic.Image = imgid.Value
if order.Value ~= 0 and plr.Ownedcl:FindFirstChild(prevclass) then temp.clpic.Image.ImageColor3 = Color3.fromRGB(0,0,0) else temp.clpic.Image.ImageColor3 = Color3.fromRGB(255,255,255) end
temp.LayoutOrder = order.Value
temp.Visible = true
temp.MouseButton1Click:Connect(function()
if not plr.Ownedcl:FindFirstChild(class.Name) and plr.Equippedcl.Value ~= class.Name then
buycl.TextLabel.Text = "BUY"
elseif plr.Ownedcl:FindFirstChild(class.Name) and plr.Equippedcl.Value ~= class.Name then
buycl.TextLabel.Text = "EQUIP"
elseif plr.Ownedcl:FindFirstChild(class.Name) and plr.Equippedcl.Value == class.Name then
buycl.TextLabel.Text = "EQUIPPED"
end
selectedtempcl = temp
clshop.ImageLabel.ItemPic.Image = imgid.Value
if order.Value ~= 0 and plr.Ownedcl:FindFirstChild(prevclass) then clshop.ImageLabel.ItemPic.Image.ImageColor3 = Color3.fromRGB(0,0,0) else clshop.ImageLabel.ItemPic.Image.ImageColor3 = Color3.fromRGB(255,255,255) end
clshop.ImageLabel.cost_display.Text = Format(tonumber(price.Value))
clshop.ImageLabel.multi_cl_display.Text = Format(tonumber(class.Multiplier.Value))
clshop.ImageLabel.Name_Of_object.Text = temp.Name
end)
end```