Any fix for this?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    The script tries to check the folder and then gets all those weapons then it’s supposed to clone the frame and edit it of what the image and name of the weapon is
  2. What is the issue? Include screenshots / videos if possible!
    it doesn’t really work but I tried to fix it and still nothing I don’t know what I did wrong but then again I’m a bit new at scripting
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    There’s none on here and if there was I couldn’t find any
--Local Script

--Services
RepStorage = game:GetService("ReplicatedStorage")

--Variables
Nothing = script.Parent.Nothing -- This is the frame holder
EditNothing = Nothing:Clone()
Items = RepStorage.GearsFolder

--Other
  for _, Button in pairs(Items:GetChildren()) do
  if Button:IsA("Tool") then
EditNothing.Name = Button.Name
EditNothing["Gear Button"].Text = Button.Name
EditNothing.Text = Button.Name
EditNothing["Gear Button"].ImageItem.Image = Button.TextureId
EditNothing["Gear Button"].ItemNamer.Text = Button.Name
  end 
end

print(EditNothing)

-- Yes the script is in the GUI

Errors? What doesn’t work?

You need to but the EditNothing variable inside the pairs loop and also parent the clone.

for _, Button in pairs(Items:GetChildren()) do
  if Button:IsA("Tool") then
      local EditNothing = Nothing:Clone()
      EditNothing.Name = Button.Name
      EditNothing["Gear Button"].Text = Button.Name
      EditNothing.Text = Button.Name
      EditNothing["Gear Button"].ImageItem.Image = Button.TextureId
      EditNothing["Gear Button"].ItemNamer.Text = Button.Name
      EditNothing.Parent -- You also need to parent it
  end 
end

try printing in the for loop

add this also in the for loop to work

i thought it was already get it i didnt know the variables had to be in the loop

so Just EditNothing.Parent thats it?

yep i used to get the same errors like this

but just that variable or the all of them

yep to clone it to the parent u set it to

You will have to parent it to the frame but you will have to write that yourself since I don’t know where it goes.

the parent is in the gui like the script and the frame is in the gui

Parent it to where you want it. If the Gui is the parent of the script then you would parent it to that.

so

EditNothing.Parent = script.Parent --script.Parent is the GUI itslef

Yeah if that’s where the Gui is

ok thx man but what about Nothing and the items variable?

You can leave them how they are just add local in front of them.

ok thx but say if i had 2 tools in that folder would it keep on adding more than just 2 if so how do i stop that?