So lets say i already have my map built, but instead of storing everything in the workspace i want to store all parts in my game inside of serverstorage.
Is there an easy way of doing this without having to set the position for every part through scripts?
You can clone each part and set the parent to the workspace
local FOLDER_NAME = "Folder"
local Workspace = game:GetService("Workspace")
local ServerStorage = game:GetService("ServerStorage")
local parts = ServerStorage:WaitForChild(FOLDER_NAME):GetDescendants()
for _, part in parts do
local clone = part:Clone()
clone.Parent = Workspace
end
To be clear, the reason why @midnight_shadowlands is cloning each part separately and not the whole thing at once is so that you can put a wait in it so that the game doesn’t lag spike
for _, part in parts do
local clone = part:Clone()
clone.Parent = Workspace
task.wait() -- load the map slowly to prevent lag spike
end
for _, child in game:GetService(“ServerStorage”):WaitForChild(“MAPNAMEHERE”):GetChildren() do
child = child:Clone()
child.Parent = workspace
end
game:GetService(“ServerStorage”):WaitForChild(“MAPNAMEHERE”):Destroy()