I have been trying to make a game that infinitely generates rooms. I’ve looked online and the only thing I could find was this script.
Here is the script:
local rooms = game.ReplicatedStorage:WaitForChild(“GeneratedRooms”):GetChildren()
for i, placeHolder in pairs(game.Workspace.PlaceHolders:GetChildren()) do
local chosenRoom = rooms[math.random(1,#rooms)]:Clone()
chosenRoom.PrimaryPart = chosenRoom.Floor
chosenRoom:SetPrimaryPartCFrame(placeHolder.CFrame)
placeHolder:Destroy()
chosenRoom.Parent = game.Workspace
end
Here is how this script works:
This is what it looks like before the script is run
This is what happens when I run the script
What I am trying to do is modify this script to make it go infinitely. I would appreciate any help.