I am wondering if there are scripts out there that does this, if not.. How would I make one? What will I need to know?
Edit: What it would do is search through everything in the workspace and delete all of the scripts.
I am wondering if there are scripts out there that does this, if not.. How would I make one? What will I need to know?
Edit: What it would do is search through everything in the workspace and delete all of the scripts.
function RemoveAll(p)
for _,v in pairs(p:GetChildren()) do
if v:IsA("Script") then
v:Destroy()
else
RemoveAll(v)
end
end
end
RemoveAll(game.Workspace)
for _,script in ipairs(game.Workspace:GetChildren()) do -- Get everything in the workspace one at a time, and that thing is called "script"
if script:IsA("Script") then -- Check if the class of that object in workspace is script
script:Destroy()--Completely remove the script from workspace.
elseif script:IsA("Model") then -- Checks if it's a model
for _,modchild in ipairs(script:GetChildren()) do -- Get every child of the model
if modchild:IsA("Script") then
modchild:Destroy()
end
end
end
end
It only gets scripts if they are directly within Workspace. Is there any way to edit it so it checks within models of the Workspace too?
Updated. If there's models or groups inside of the model, I think you can figure it out.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Works perfectly.