#room generation bug left and right roon
1 messages · Page 1 of 1 (latest)
module
here bug they overlap cuz of left and right rooms spawning like 4 or 5 times and then ofc this happens idk how to fix that
local room = require(script.Room)
local prevRoom = workspace.StartRoom
workspace.GeneratedRooms = Instance.new("Folder")
workspace.GeneratedRooms.Name = "GeneratedRooms"
for i = 1, 50 do
prevRoom = room.Generate(prevRoom)
end
there is already one
Check if that area where you wanna spawn is empty
you could try raycasting but idk if that wouldn't lag a bit
well
single raycasts aren't that heavy
but
srill
wdym
um good idea
?
wdym area
Either use raycast to check it or make a part the size of ur model and clone it at that position and if part.Touxhed function==nil then place ur structure