I have a script that duplicates a folder of stuff - models, other folders, scripts, etc. The problem is, using :Clone()
does not duplicate tools and leaves those behind, as shown in the video below.
Video: https://i.gyazo.com/b3ef1f10ad63c0defd2389bc1c50eb5b.mp4
How can I fix this?
EDIT: Here's a screenshot of where the tools are coming from: https://i.gyazo.com/f9698eda8a8fd057c7ba3d472546f96e.png
Here's my code:
local terrainSaveLoad = require(game.ServerScriptService.TerrainSaveLoad) local maps = game.ServerStorage.Maps while true do terrainSaveLoad:Load(maps.Village.Terrain) Village = maps.Village.Village:Clone() Village.Parent = workspace wait(15) workspace.Terrain:Clear() Village:Destroy() wait(5) end
EDIT2: Well I tested the same exact part hierarchy and the problem did not appear, so I'm not sure what's causing this. https://i.gyazo.com/c7d7570353127c419e32a72b2345e470.png
I also tried grouping the tools by themselves and that seemed to copy over correctly. It seems to be one of those random Roblox glitches I always get myself into.
maybe you need to be more specific.. because the script won't know where should you put the village in because the script doesn't know where is workspace located at... so.. You need to add game.Workspace in the Village.Parent ..
If you don't understand just take a look at this script v
local terrainSaveLoad = require(game.ServerScriptService.TerrainSaveLoad) local maps = game.ServerStorage.Maps while true do terrainSaveLoad:Load(maps.Village.Terrain) Village = maps.Village.Village:Clone() Village.Parent = game.Workspace wait(15) workspace.Terrain:Clear() Village:Destroy() wait(5) end