Why "game.Workspace:ClearAllChildren()" Doesn't work?

Hello,I’m trying to make a script that reset everything that is inside of workspace
the script:
game.Workspace:ClearAllChildren()
but I dont know why, when I run the script it doesn’t Destroy all workspace


Please someone tell me what is going on

1 Like

Workspace.Terrain cannot be destroyed, when Instance:ClearAllChildren clears everything, no exceptions. I recommend you put your map in a model/folder, then doing :ClearAllChildren on the map’s parent to clear it.

1 Like

yes but if I place the map in a folder there is scripts that will stop working

Is there a chance your scripts depend on the map’s parent being the workspace? If so you might want to fix those dependencies.

there is a lot of scripts in my game and change them will take me a lot of time and no they dont depend
on Workspace