Simple question. Can you transfer a Folder with models to another place with TeleportData so that I can use this folder in another place. I am asking this because the DevHub does not clarify the limitations to TeleportData.
Place: local Guns = TeleportService:GetLocalPlayerTeleportData()[1]
If not, are there any other ways to do this instead of copying and pasting the folder to the place because I will be updating the folder by adding new guns to it.
local IntervalInMinutes = 2
local AssetID = 000000
local GunsFolder = Instance.new("Folder")
GunsFolder.Name = "Guns"
GunsFolder.Parent = game:GetService("ServerStorage")
local IS = game:GetService("InsertService")
function LoadAsset(_AssetID, parent, _unpack)
local Asset = nil
local s, e = pcall(function()
Asset = IS:LoadAsset(_AssetID)
end)
if not s then print("Failed to update guns."..e and e or "") return nil end
if _unpack then
for _, v in pairs(Asset:GetChildren()[1]:GetChildren()) do
v.Parent = parent and parent or workspace
end
else
Asset:GetChildren()[1].Parent = parent and parent or workspace
end
Asset:Destroy()
end
while 1 do
GunsFolder:ClearAllChildren()
LoadAsset(AssetID, GunsFolder, true)
task.wait(IntervalInMinutes*60)
end
upload your guns as a model (not a folder), then change the AssetId