Let me explain what this is. So, basically what happens is:
ServerStorage > Clones > Stage1C > Set1 Set2 Set3 Set4
basically it selects 1 of the Set1,2,3, and 4. Each set inside has several obstacles across the entire map that are displayed for players to run. I don't want it to work that way anymore, how can I make it so that it goes to each Set but instead of selecting the entire set and all children inside, it only selects 1 child inside each set and places them all in the course for the player to play?
my apologies if I didn't give enough info. If you need more help understanding here is a picture of where I place all 4 sets:
https://imgur.com/55YFdzE
and inside each set, there will be 4 obstacles that every round 1 of them shows visible for the player to run throughout the course.
Core.Stage:ClearAllChildren(); Stage = Stage:Clone(); local randStageMap = game:GetService("ServerStorage"):FindFirstChild("Clones"):WaitForChild("Stage"..stageNumber.."C"):GetChildren() local actualMap = randStageMap[math.random(1,#randStageMap)]:Clone() actualMap.Parent = Core.Stage for _,obj in pairs(Stage:GetChildren()) do obj.Parent = Core.Stage; end;
The for loop you are making is getting all the children and putting it in the stage. You might want to do this.
local children = Stage:GetChildren() local random = math.random(1,x) --x is amount of children in the set children[random].Parent = Core.Stage