(by bounding box, i mean a room will not load if its bounding box (or bounding boxes in theoretical reality), so that rooms that turn 90 degrees without going upwards won’t intersect a previous room, also i just have a really tall and thin room with a ladder in case all rooms fail to load somehow)
currently room loading is this
function module:loadnextroom()
local needed:Model
for _, v in spawnedrooms:GetChildren() do
if v:HasTag("MostRecentlySpawned") then
needed = v
end
end
needed:RemoveTag("MostRecentlySpawned")
needed.Door:Destroy()
local room:Model = rooms[daft:randrand(1, #rooms, true)]:Clone()
room:AddTag("MostRecentlySpawned")
room:PivotTo(needed:FindFirstChild("Exit", true).CFrame)
room.Door.lock.Lock.Touched:Connect(function(otherPart: BasePart)
module:attemptunlock(otherPart, room.Door.lock.Lock)
end)
room.Parent = spawnedrooms
NewRoom:FireAllClients(room)
LoadedRoom:Fire(room)
end
and as described in ()s, i want rooms that turn without going upwards, bounding boxes is a possible solution but
- possible for no rooms to load (maybe…?)
- how the hell