Hi! I am currently working on a horror game in which you progress through generated rooms. There’s one problem. Adding monsters. I just don’t get how it would work because it would not just stay in a fixed position every time as the rooms are random. There are ones going up, sideways, etc… Could I have like a boss at a specific amount of rooms or something? Thanks for helping and here’s the room generation code if you need it.
room.random = Random.new() local roomnumber = 1 function room.Generate(prevRoom) local possibleRooms = workspace.Rooms:GetChildren() local randomRoom = possibleRooms[room.random:NextInteger(1, #possibleRooms)] local newRoom = randomRoom:Clone() newRoom.Entrance.Transparency = 1 newRoom.Exit.Transparency = 1 newRoom.PrimaryPart = newRoom.Entrance newRoom:PivotTo(prevRoom.Exit.CFrame) newRoom.Parent = workspace.GeneratedRooms roomnumber = roomnumber + 1 return newRoom end return room