Is there a faster way to delete scripts in free models

I am just wondering if there is a faster way to delete scripts in a free model because it has a lot and i dont want to have to do it manually.

Uh I wouldn’t necessarily trust the model, even after deleting scripts, but this is how:

local model = workspace.FreeModel

for _, child in pairs(model:GetDescendants()) do
    if (child:IsA("Script") or child:IsA("LocalScript")) then
        child:Destroy()
    end
end

You could replace the workspace.FreeModel with your model, and just run that in the command bar.

1 Like

how do you run it in the command bar

never mind i think it worked tysm