I tried out i,v in pairs finally And It messed up...
for i,v in pairs(game.Workspace:GetChildren()) do v:remove() -- [[ Error| The Parent Property of Workspace.Terrain is locked. current parent:Workspace.new parent NULL ]] end
The Terrain object is RobloxLocked, meaning it cannot be removed. To get around this and other objects that are RobloxLocked, use this:
for i,v in pairs(game.Workspace:GetChildren()) do if v.RobloxLocked == false then v:Destroy() -- Use :Destroy(), :remove() is deprecated. end end