Ok so I have this game, and it picks a random map from SerevrStorage, then puts it in a Model called "MapHolder" in Workspace. I need i once its put in the MapHolder, to ungroup the map. Is there part of code that can do it, like :unGroup() ??
if game.Players.NumPlayers > 1 then h.Text = "Deciding what map to play" wait(5) ranMap = math.random(1, #map) mapChosen = map[ranMap] h.Text = "Map Chosen: " .. mapChosen.Name wait(3) mapChosenClone = mapChosen:Clone() mapChosenClone.Parent = game.Workspace.MapHolder wait(2)
This picks a random map. What i need is when the map goes to MapHolder, it ungroups itself. I would post the whole script, but the script is like 100 lines long. Anyone help??
Make the (children of the map's) parent to the MapHolder, then delete the map model.
for i,v in pairs(mapChosenClone:GetChildren()) do v.Parent = mapChosenClone.Parent wait() mapChosenClone:Destroy() end
Why not just put it all in workspace instead of adding it to the model then ungrouping it?