I have a model that is used in a generation system. It usually works completely fine and loads in well, but as soon as i added a new folder inside and put all of the walls of the room inside it, now it cant detect any of the children in the model using :GetChildren(), why is this? its super confusing and im wondering if this is a bug, or im stupid.
Code Snippet:
local genroom = pickroom()
if not genroom then
return
end
print(genroom) -- testing
for i,v in pairs(genroom:GetChildren()) do
warn(v.Name, genroom) -- never warns anything
end
prints nothing except the room name - print(genroom), and an infinite yield error from code below simply defining a folder which i know 100% exits: Infinite yield possible on 'Intersection:WaitForChild("DoorAreas")
Extra Note: This happens no matter which room i do it on.
While the room is like this, I can’t set it’s parent either: The Parent property of Intersection is locked, current parent: NULL, new parent GeneratedRooms
okay, what i want you to do, test it in the game, and see the generator model, try to see if there are stuff missing on it. if it is, you might want to anchor everything in the model.
what i mean is play the game in studio, go to the explorer and see if the model has parts missing, you can switch to server view if the model is in serverstorage or something like that
weird, this isnt a problem with your script, its more of the set-up.if the cloned room isnt really in workspace then it means its being deleted by something, either its somehow falling out of the map (consider anchoring everything in the model just to see) or see if a script is interfering with it
you might want to re check your pickroom() function, can you send it here? (cause your pick room function is the only suspect other than roblox engine)