I am trying to delete all the parts with the same name when a value fires but it doesn’t work.
my code here:
local tabla = {"mancha1"}
for i, v in pairs(game.Workspace:GetChildren(tabla)) do
if borrar == "si" then
v:Destroy()
end
end
I am trying to delete all the parts with the same name when a value fires but it doesn’t work.
my code here:
local tabla = {"mancha1"}
for i, v in pairs(game.Workspace:GetChildren(tabla)) do
if borrar == "si" then
v:Destroy()
end
end
I dont think u need to add your table as a parameter not sure if :GetChildren() has parameters also
Can you explain this
for i, v in pairs(game.Workspace:GetChildren()) do
if v.Name == "si" then
v:Destroy()
end
end
I think this is what you were going for