Hello!I wrote two scripts,one creates instance parts, the other removes them.
Script for creating instance parts
local Spawn = script.Parent
Spawn.MouseButton1Click:Connect(function()
local Part =Instance.new("Part")
Part.Size=Vector3.new(4, 1, 2)
Part.Position=Vector3.new(-11.202, 47.42, -81.4)
Part.CastShadow = false
Part.Anchored = false
Part.Parent=workspace.Folder
end)
Script to remove instance parts
local Delete = script.Parent
Delete.MouseButton1Click:Connect(function()
game.Workspace.Folder:Destroy()
end)
The problem is that the script deletes the folder in which the parts instance is located. I have no options on how to make the script delete the parts, but not the folder.
Bye!