Hi friends, I have a problem in generating the world. The problem is that the world sometimes, so to speak, repeats the same thing and it turns out horribly and not beautifully, the generation works according to the dungeon principle (I did it from this video: How To: Make a randomly generated dungeon on roblox - YouTube).
I need to reduce the repetitions of a certain cell so that this is not the case:
but due to the fact that I am not very good at programming, I cannot write adequate code.
local rooms = game.ReplicatedStorage:WaitForChild("GeneratedRooms"):GetChildren() for i, placeHolder in pairs(game.Workspace.PlaceHolders:GetChildren()) do local chosenRoom = rooms[math.random(3,#rooms)]:Clone(); chosenRoom.PrimaryPart = chosenRoom.Floor; chosenRoom:SetPrimaryPartCFrame(placeHolder.CFrame); placeHolder:Destroy(); chosenRoom.Parent = game.Workspace; end