jahoobas
(jahoobas)
August 20, 2021, 12:47am
#1
I just don’t know why it is only working for one model! I have even checked if i was spelling the model right.
What do you want to achieve? I want to clean up the scripts but this is a hassle.
What is the issue? The command is only working in one model.
What solutions have you tried so far? I don’t think there is any solutions out there.
If you can help, please do!
Also, if I put this in the wrong category, I hope it is okay because I couldn’t find the correct category.
Pyxrien
(Pyxrien)
August 20, 2021, 12:48am
#2
Could you post the command to help us out?
jahoobas
(jahoobas)
August 20, 2021, 12:49am
#3
The command is
local model = game.ServerStorage.Maps.Symmetry.Paintableparts.PaintedCube
for _, child in pairs(model:GetDescendants()) do
if (child:IsA(“Script”) or child:IsA(“LocalScript”)) then
child:Destroy()
end
end
Pyxrien
(Pyxrien)
August 20, 2021, 12:49am
#4
Are there any errors in the output when you run it?
jahoobas
(jahoobas)
August 20, 2021, 12:50am
#5
No errors, at all. It will be amazing if you can help!
jahoobas:
PaintedCube
Are you saying there are more models under the PaintedCube and its only doing one of them?
Pyxrien
(Pyxrien)
August 20, 2021, 12:53am
#7
I’m honestly lost ahaha, the only thing I could think it to be would be the path you defined model as - though I’m pretty sure that would throw an error if it was the issue.
jahoobas
(jahoobas)
August 20, 2021, 12:54am
#8
I should double check, but I did use the autocorrect
jahoobas
(jahoobas)
August 20, 2021, 12:55am
#9
If you dont know, PaintedCube is under a model. I have 3 maps, only one will remove the scripts when the command is ran.
Pyxrien
(Pyxrien)
August 20, 2021, 12:56am
#10
Could you attach an image here of the explorer, so we can see the layout described in more detail?
jahoobas
(jahoobas)
August 20, 2021, 1:00am
#12
Opposition is the only one that worked.
Pyxrien
(Pyxrien)
August 20, 2021, 1:01am
#13
So am I right in saying that you are changing the map variable each time to make it work for each map?
jahoobas
(jahoobas)
August 20, 2021, 1:01am
#14
Yes. Thats what i am doing to do this.
Pyxrien
(Pyxrien)
August 20, 2021, 1:03am
#15
Do you have the output tab open, just to be sure?
jahoobas
(jahoobas)
August 20, 2021, 1:08am
#16
Yessir! I sure do. I hope you can help!
Pyxrien
(Pyxrien)
August 20, 2021, 1:10am
#17
and when you run the command, nothing pops up?? if not, I’m really sorry but I’m just completely lost, the code you sent should work as long as the variable is correctly defined.
jahoobas
(jahoobas)
August 20, 2021, 1:30am
#18
Yes, nothing pops up. It was helpful for you to try!