Can you remove all scripts in a model at once in workspace?

Hi! I have a map for a game. It just feels a bit messy to me because each block has it own script and I want to remove them all and add one script only for the entire platform.

My platform is made out of 1024 blocks which is a problem for me. Is there anything I can type in the command bar to remove all 1024 scripts in the model at once?

use a for loop to cycle through all desendants of the model and delete them

for _,v in pairs(pathtomodel:GetDescendants()) do
		if v:IsA("Script") then
			v:Destroy()
		end
	end                  

like this

(PLEASE MARK THIS AS SOLUTION)

3 Likes

Thank you. All the scripts have disappeared.