How can i make a map that will auto generate (for a limited ammount of times)?

How can i make an auto-generated map that has 2 base places (will always be there) and then a few more rooms, in a way similar to the infinite runner preset?(as in spawn-room-room-room-end)

If all your rooms are uniform in dimension you could house a few pre-made choices within a folder in ServerStorage and grab a random one from there for each room, moving it from the folder into workspace.

I’m a little confused on what you’re asking for but I think I have a game that is sort of related to what you’re asking? Go ahead and play it and you can see if it was what you’re looking for. I can show you how to make it like that too. Hopefully this helps.

https://www.roblox.com/games/8366696273/Wild-Shots-BETA

It has a round system and everything.

1 Like

I already know how to move a room. My problem is not knowing how to make a few of them just pasted one after the other. They are all the same size

Not really what i am looking for. what i need is a way to paste a few rooms of the same size in random order, and have them be in between 2 rooms

Okay gotcha. So if they’re all the same size, and attach in a linear order like the running game, you would be able to use a for-loop, where ‘i’ can be used to place the parts you pick in order. Here’s an example that will stack 1x1x1 parts horizontally, you can adapt it to your application by picking a random room instead of duplicating a part:

local part = Instance.new("Part")--template part to be cloned, in your app this wouldn't exist
part.Size = Vector3.new(1,1,1)
part.Anchored = true

local origin = Vector3.new(0,0,0)--where the parts should originate from

for i = 0, 5 do
	local step = part:Clone()
	step.BrickColor = BrickColor.new(i)--Colors the part different just to make them easier distinguished
	step.Parent = workspace
	step.Position = origin+Vector3.new(i,0,0)--Because the size is 1 stud, we can increment by i.
	--If the size of the part was any greater, multiply i by its size (such as (i*4,0,0) for a 4 stud part.)
        --Also to note: If you're setting a model, use :SetPrimaryPartCFrame() and have the model's
        --PrimaryPart to something centered at the middle of the room on top or bottom.

end

part:Destroy()--the template part is no longer needed

Okay, my bad! I hope you find your solution!